Are you able to reproduce this behavior without any mods at all? Could you provide a video of the issue happening with the F3 debug screen enabled?
Are you using any data packs?
Duplicate of MC-300118.
Please, refer to the 25w31a changelog:
The debug screen is accessible by pressing F3, as before
It can now be accessed from everywhere in the game, not only when in a game world.
You’re using a modified client. Does this happen in a fully vanilla environment?
I could not reproduce in 1.21.7 nor 1.21.8. Could you please provide a video of the issue happening with the F3 debug screen enabled?
Can confirm this behavior.
Could you please attach the full launcher log?
Duplicates MC-301225.