This is happening to me in version 1.21.4 in my worlds, so if I try using this command (/gamerule logAdminCommands true) it will not proceed and will just be stuck on this. Don’t know if it’s my client-side or server-side of Java or Minecraft, and I wouldn’t like to have to re-create my world and lose all my things/advancements. Although, when recreating, it does say it’s toggled on but not actually functioning.
Does your issue still happen in the latest versions? (1.21.5, 1.21.6 Pre-Release 2)