It at least gets you in the same ballpark. I'm not allowed to hook a debugger up to anything in the staging environment, and it's not terribly fun to be stuck, for example, having to guess at how memory fences are behaving in production because all the machines where you
can test things empirically have a different memory model.
Or, for example, there's one library I use that includes some inline assembly language routines. Which target SSE, not SVE. So, if we're targeting different ISAs, then my dev box isn't even executing the same code as what would be running in production.