Let's say a character is a cleric with a domain granting access to a skill in-class, such as Trickery granting Bluff, Disguise, and Hide. After maxing out one of those skills, how many ranks does the character have if the character suddenly becomes an ex-Cleric, losing all class abilities, including access to Domains?
They cannot put more ranks in that skill until the cross-class maximum exceeds their current ranks, but they keep the ranks they have.
Player’s Handbook pg. 62
SKILLS AT HIGHER LEVELS
If you have not maxed out a skill, you can spend extra skill points on it and increase its rank further.
First, find out what your character’s maximum rank in that skill is. If it’s a class skill, the maximum rank is the character’s new level + 3. If it’s a cross-class skill, the maximum rank is half that number (do not round up or down).
You may spend the number of skill points it takes to max out the skill, provided that you have that many skill points to spend.
This is where we see the maximum implemented in detail (other places merely refer to it as “a maximum” without detail). The ability to spend skill points, here, is clearly limited by that maximum.
There is no indication that you should retroactively lose ranks in this situation.
I'd imagine that the intent wqs, it's in the culture of those that follow that domain. As a result the skill ranks remain & are effective, but the reason the character has ranks is because they were raised around individuals who have ranks in that skill. It could certainly be different dependent on the game your in, but to me that makes sense.