Exactly. If you're actually in a legal dispute with Facebook, the cost of rewriting your frontend to not use React is minimal.
It's not like React is a massive library with a huge surface area. Even a fairly complex application could be migrated to an alternative like Vue.js if the need arose.