Forked commands can run /return multiple times for the same function
This command can cause the function to return multiple times. (You need at least 2 entities in your world.)
execute as @e run return 0
Given that functions normally have a single return value, this seems like an unintended behavior.
You can use the attached datapack and run /function returnbug:t