When in spectator mode, the guardian's eye will follow the player, but the behavior of the guardian is not affected as far as I can tell.
Environment
Java Version 8 Update 181 (build 1.8.0_181-b13)
Windows 10 Home 64-bit
MSI Z370 GAMING PLUS Motherboard
Intel Core i5-8400 Coffee Lake
EVGA GeForce GTX 1050
Patriot Viper Elite 16GB RAM
Thank you for your report!
We're actually already tracking this issue in MC-77576, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki