That’s not how that hook is meant to be used:
do_action( 'delete_post', int $postid, WP_Post $post )
https://developer.wordpress.org/reference/hooks/delete_post/
The action gives you the post ID and a post object.
So don’t access $_GET
or the global $post
object, instead use the what the action gives you.