remove_menu_page breaks “Add media”

It’s because you’ve hooked it to the wrong action, it should be admin_menu, not admin_init.