If the entity is despawning due to a dimension change.
Optional
This is only used for players. If the player is disconnecting from the server.
If the entity is despawning due to death.
If the entity is despawning due to a dimension change.