Determine home country of tax residence

Hi, we are considered non-resident aliens in the US for tax purposes (J1 visa for research scholars), which means we have to specify the home country of tax residence in order to take advantage of tax treaties. We had a two-year postdoctoral fellowship in Canada before moving to the US in September 2023. We paid taxes in Canada and lived in Canada for two years, but have permanently emigrated from Canada and have no significant ties there, i.e. no personal or economic ties. However, we do have significant ties to Germany. I have German citizenship, my wife has a permanent residence permit, our parents live there, we have our personal belongings there and we lived there permanently for a long time before moving to Canada. My wife is also a Russian citizen and has real estate in Russia.

 

What is our home country for tax purposes? Canada, where we have lived for the past two years, or Germany/Russia? We will return to Germany after our time in the US. Thank you so much for your help!