Extreme Retraining
Changing an ancestry or heritage requires biohacking or magic, such as reincarnation into a new form. This might take a complex ritual, exposure to experimental biotechnology, or the intervention of a deity. For instance, you might require an ysoki who wants to be a shirren to first become trained in Shirren Lore, worship Hylax, and eventually do a great service for a shirren colony to get a divine blessing of transformation.
Retraining a background requires altering the game's story so that the events the PC thought happened didn't. That can be pretty tricky to justify! One easy scenario is that they had their memory altered or replaced with memories from another timeline and need to get it restored to reveal their “true” background—the new retrained background. They might also be revealed as a clone or parallel self from another reality.
Of course, in all these cases you could make an exception and just let the player make the change without explanation. This effectively acknowledges that you're playing a game and don't need an in-world justification to make certain retroactive changes. Or the justification could be something the player is unaware of until later, potentially tying the retraining into the larger ongoing themes of the campaign. It might be easier, or require less suspension of disbelief, to ask the group to adjust their ideas of what previously happened in the game—retconning events—than to create an in-world justification for something like an ysoki turning into a shirren via magic or a technomancer becoming a witchwarper via reality hopping.