You can wrap the server part of a shared method with this.isSimulation
When you run a shared method it first runs a simulation on the client and then on server - updating the client with its results (which are usually the same - which is why it's called Optimistic UI).