I did a few tests:
Phone that never had a SIM/eSIM: country not detected
Phone that had a SIM before but now doesn't have one: country not detected
Phone with a SIM card, airplane mode on: country detected
Phone with a SIM card, airplane mode off: country detected
So it looks like only the current SIM is used and airplane mode doesn't have any effect on country detection.