I've personally flown domestic commercial flights in at least two foreign countries (China and Mexico), that I have no legal permanent residency in, using the same American passport I used as ID to enter these countries to begin with; and there was no issue. I don't even know what the Chinese or Mexican equivalent of a REAL ID might be like. I'm sure the US could create a similar legal ID framework for domestic air travel.