It happens in worlds with and without data packs.
This happened for me on the last snapshot, too. Changing the keybinds or setting the command to toggle/hold does nothing.
It happens in worlds with and without data packs.