Make player and entity vanish api behave the same
Is your feature request related to a problem?
Yes. Currently the behaviour of the vanish api for hidden players and hidden entities is different. The hidden players remain hidden even after world changes until the quit, while entity hidden status is removed on world change. The documentation does not say when it's gonna be lost (but neither the fact that it's being cleared), so more consistent and documented behaviour or the cleanup part would be appreciated.
Describe the solution you'd like.
It would be the best if players and entities would only have their vanish status cleaned up on unload, not in world change.
Describe alternatives you've considered.
The current solution is listening to https://jd.papermc.io/paper/1.21.10/io/papermc/paper/event/player/PlayerTrackEntityEvent.html and rehide the shown entities
Other
No response
Kind of the same issue as #12599