The reality is, it varies.
I just opened the language picker on the first site I had in my browser tabs (happened to be Epic games) and they display the language list using native names for the target language, rather than current language (screenshot attached)
I agree it's much better to do it this way.
As a developer, why it doesn't happen sometimes could just be by accident. If you intentionally set out to localise a site and put all text and menu elements into localisation files to be translated, then the language names are going to end up getting translated too. It takes conscious thought and UX design to realise that it's better for accessibility if that single part of the site is actually just static text, regardless of what language is selected.
And before anyone suggests using country flags in your language picker as a cool solution - please don't, because that sucks too. There isn't a 1:1 relationship between countries and languages and so the flag approach is a flawed compromise at best, and actually insulting at worst.