You are missing the model, and once you have it the sometimes-works pattern resolves. There are several caches stacked, and each fix clears a different one.
From the data outwards:
The data cache. Results of fetches, stored on the server, keyed by URL and by any tags you attached. Invalidating a tag or a path clears entries here.
The full route cache. Rendered output for static routes, on the server. Path invalidation clears this.
The client-side router cache. Already-fetched route payloads held in the browser as you navigate. This is the one that surprises people, server-side invalidation does not clear the browser's copy. This is exactly why navigating away and back still shows old data: you are being served the browser's cached payload and the server is never asked.
So the two symptoms map cleanly:
- Old value after the action, same page - server-side, needs path or tag invalidation
- Old value after navigating away and back, client-side router cache
An action that invalidates a path does signal the client to drop its cache for that route, which is why it works sometimes. When it does not, it is usually because the path you invalidated is not the one the data is displayed on, or you invalidated a page when the layout holds the data.