UI Code breaks with every update in Microsoft VSTS

Hi, We have used UI path for certain monotonous activities. We are using Microsoft VSTS for logging details like stories and tasks. But everytime there is an update/upgrade to VSTS change in selectors/object make our code to break and we have to revisit our code to update the selectors.

Is there a way by which our code can be made accomodate any future upgrades?

How UI path handles updates in the any software?

Thanks
Rohit