Here's an example command that if ran through a function/command block will replicate the issue.
execute as @p run summon bat ~ ~ ~
Here's an example command that if ran through a function/command block will replicate the issue.
execute as @p run summon bat ~ ~ ~
Use 'execute as @p at @p run summon bat ~ ~ ~'