Mobs can still track players in spectator mode
If you are in survival or adventure mode and switch to spectator, mobs still track you and act as if you are in one of those two modes. This does not happen if you switch from creative to spectator.
If you are in survival or adventure mode and switch to spectator, mobs still track you and act as if you are in one of those two modes. This does not happen if you switch from creative to spectator.