Using ReplacePrefabAssetOfPrefabInstance on a child of a prefab variant

(Similar question has been asked here but the solution given there is not working for me - Replacing Prefab Asset reference on a nested prefab in Unity 6?)

Say I have a prefab ABase which contains another prefab BBase as a child. Then I have an AVariant which is a variant of ABase. I also have BVariant which is a variant of BBase. Then I want to replace AVariant’s child BBase with a BVariant. I haven’t figured out any way to do this. The UI for the replace operation is greyed out in the Editor, and trying to use the ReplacePrefabAssetOfPrefabInstance method throws an error: ArgumentException: Input instance is not an outermost Prefab instance root.

I understand that the prefab system forbids doing the replacement operation on a nested prefab. But why? Is there some reason why this is conceptually not possible? I don’t totally understand how the prefab system is implemented but it’s not clear to me what the issue would be.

Aside from that, if anyone has any workarounds for achieving similar behavior I’d be very grateful. Everything I’ve thought of or found online so far is clunky and has side-effects I want to avoid (e.g. breaking inheritance, breaking object references in parent prefab, breaking the possibility of the parent prefab overriding params on child prefab).

This operation seems so useful and important I’m confused why I haven’t seen more people discussing workarounds. If it’s helpful I can say more about my particular use case (which I think is quite normal!), I just don’t want to add too much noise to the main question.