Using /locate
in a world that does have the thing you're locating (i.e., /locate structure
in a world with structures turned off) causes a large amount of lag. Exiting the world causes the game to get stuck on the Saving World screen. I have only tested this on 1.20.1.
Duplicate of MC-250276.