How to get the slug of the homepage when editing it in WP admin?

post_name would be the slug as it was set before the page became the front page. When the URL for the front page is output via the API, the get_page_link function checks if the ID matches the page_on_front option and returns the home_url in that case. This is why you should always use the API to output data and not directly access post object fields.