I recall something similar occurred with my college team many years ago on a punt return when the starting QB for Wake Forest left the sideline to tackle the punt returner and prevent a TD.
The officials awarded the TD to my school and called an unsportsmanlike penalty.
‘The officials awarded the TD to my school and called an unsportsmanlike penalty’
That is the rule.