Which ERP application are we speaking of?
Two things I thought might help.
In some applications you need to enable scripting in order to use the GUI for automations.
E.g. in SAP, this might be required.
Enabling SAP GUI Scripting.
If script enabling does not do the trick, I would consider computer vision.
Computer Vision recognises, with the help of AI, selectors, without aid from the relevant application. There are a bunch of the ‘normal’ activities(Get text, type into etc.) which can be used with Computer Vision.
Take a look: