How to deal with inconsistencies in the prod and development environment?

We have a CRM system - a SAP web application that is used by the bot as a part of automation. The application has a test url and a production url. We develop and test in the test CRM system and if all good then deploy for prod.
We noticed the bot failing in prod and on analysis came to know there are some differences especially in the UI selectors for some elements in both the environments. We have used “aaname” property and proper wildcards in the selectors to ensure it works fine in prod. But sometimes we see the placement of some UI elements are not the same in prod / selectors are entirely different - something which we cannot identify right at the start/development phase.
As we cannot do any test using prod CRM, we cannot figure out a possible discrepancies in the selectors after we deploy to prod.
Can you suggest us some ways to deal with such inconsistencies in the pre-prod and prod environments? Can we do something that can help foresee such issues in prod application? Is there something we can do with the prod system just to validate all the UI elements the bot looks for is identifiable without doing any update in prod? What would you advise us to do here please?
Kindly let us know. Thanks!