All browsers are compliant to the XPath 1.0 specification. The XPath 1.0 specification is published here: XML Path Language (XPath)
A concrete and valid XPath expression string in a browser must be valid in other browsers as well, because all of them are compliant to the same W3C Recommendation.
This question does not make good sense, as a concrete XPath expression against a concrete HTML document must have same validity across all browsers. Chrome DevTools is super, no doubt, used by many developers.
This is a frequently asked question. Try searching this forum with key “dynamic id” first. You will find many previous discussions. If you read them through, you would certainly get at a loss what to do. The fact is, there is no single silver bullet.
If you want to manipulate dynamic elements using XPath, you need to study the XPath technology itself and train yourself to be capable of writing expressions manually. A Good tutorial is here