I believe this issue with language switcher will be relevant for many as it’s an important aspect for SEO. Note - I use Shopify Dawn theme.
I currently have a 2-language store - one in English, one in another (German) language.
In the past I had English version using .com domain and German language .com/de
However, as I’ve learnt that Germany was the primary market, it was much better to use .de domain instead of .com/de . In addition to this, href settings were incorrect if used .com and .com/de (Shopify markets settings). So I’ve purchased .de domain and wanted to move German language to .de domain and keep the .com domain for English language and international buyers. However, I would like to keep the language switcher available on the website (same as before) so that clients could switch between languages, but the switcher would switch between domains (.com → .de and vice versa) and not to between subdirectories as it is now (.com → .com/de and .de → .de/en). currently all the pages are duplicates (.com = .de/en and .de = .com/de) as there is no other way to keep the switcher and it’s not letting Google index pages well.
You understand it correct, both domains point to the same shop.
Regarding staying on the same page or landing on homepage - I believe it would be better to stay on the same page, but it all depends on how hard/easy it is to implement. Just looking for the easiest & working solution, so landing on the homepage would be absolutely fine as well.
As you have mentioned that you have already bought the .de domain then you can attach the same to the other market with the option that shopify provides i.e. use Separate domain for the market.
If you are wondering how to attach then you first need to attach the other domain that you have bought in your shopify store, and then when you click on add existing domain, you will see the domain and you can attach the same.
Hopefully it will help you. If yes then Please don’t forget hit Like and Mark it as solution!