Prior to Covid, my wife had to exit the country to get photos taken as part of the permanent resident process. We took a trip to Montana for that purpose.
This seems to have changed in the past 3-4 years, but as the GP said, the original process did involve leaving.