If a player spectates another spectator that moves, the locator bar starts moving randomly. For a demonstration, see the attached video. This isn’t the case for the person who is spectated; from his perspective, the other person just doesn’t show up on the locator bar.
I was able to reproduce this issue in Minecraft Java Edition 1.21.7.
If a player in spectator mode spectates another player who is also in spectator mode and moving, the player locator bar begins to flicker and behave unpredictably.
Additionally, I noticed that if the spectator switches to Creative mode after spectating, the locator bar continues to stay on screen and does not disappear as expected.
This behavior seems to persist even after the spectating ends.
[media]