I found that context (PowerApps) and Xrm (unified) objects have issues when it comes to destructuring.
const { openForm } = Xrm.Navigation; (This works with legacy ui)
const { openForm } = context.navigation;
Both of these will result in error when openForm is executed. I am guessing that the openForm is not permanently bound to its context object.
Also, casing of "navigation" is inconsistent between the 2 objects. They should be the same.