Edit 2: Solved it for now like this, but I don't think this is how it's supposed to work
{% for siteForEntry in entry.getSupportedSites %}
{# get the site #}
{% set site = craft.app.getSites.getSiteById(siteForEntry.siteId) %}
{# check if it's the current site #}
{% if site.id == entry.siteId %}
<option value="{{ site.handle }}" selected>{{ site.name }}</option>
{% else %}
{% set entryForOtherSite = craft.entries.id(entry.id).site(site).one() %}
{# if it's not the current site, get the entry for this site #}
{% if entryForOtherSite.uri == '__home__' %}
{% set prettyUrl = site.baseUrl() %}
{% else %}
{% set prettyUrl = site.baseUrl() ~ entryForOtherSite.uri %}
{% endif %}
<option value="{{ site.handle }}" onclick="location.href='{{ prettyUrl }}';">{{ site.name }}</option>
{% endif %}
{% endfor %}