The Bug:
Discovered while testing MC-46503. (Original reporter).
When you press F4 while spectating a mob with a shader effect it will toggle the shader effect on and off. But because the game mode switcher is opened using F3 + F4 you will also toggle that effect by opening the menu. This is inconsistent with other F3 shortcuts. For example F3+ D or F3 + A do not perform the action done by pressing these buttons, so you do not move, but this is not the case for F4.
Steps to Reproduce:
Spawn a Creeper, Enderman, Spider or Cave Spider.
Put yourself into spectator mode and spectate the mob by left clicking it.
Open the game mode switcher by pressing F3+ F4.
❌ The shader effect is toggled.
(You can move the selector to spectator mode before closing the menu to prevent you from stopping spectating the entity).
Can confirm in 21w13a.