The fix for this issue is the one listed here:
https://github.com/facebook/react-native/issues/35210
Do not apply other patches like removing maven{} blocks or other which will have unintended side effects.
https://github.com/facebook/react-native/issues/35229#issuecomment-1306038652