How to detect if a player stops spectating an entity after being placed into it with `/spectate`

As the title says basically

Continue to help post