The reason your code redirects to /wp-admin/edit.php
is because the /wp-admin/post.php checks for a referrer using wp_get_referer()
before loading.
For this reason, you’re best placed using get_edit_post_link()
to output links to the page.
If you’d like to continue down the path you started, you’ll need to satisfy the referrer conditions.