AActor event for editor shutdown?

Did you tried using Destroyed()?

EndPlay as equivalent of BeginPlay will only run on gameplay, destroyed should be called anywhere