If a module defines a new contextual likes in a *.links.contextual.yml file they are not available unless 1 of these things happens:
- The user's permissions change
- The user opens a new browser session
- The user logs out and in.
This is because the contextual links are cached on the client-side and the cache is not cleared unless the hash created by the user's permissions hash changes.
I found while working on #2753941: [Experimental] Create Outside In module MVP to provide block configuration in Off-Canvas tray and expand site edit mode which creates a new contextual link.
This could be fixed by a relying on a hash of current modules installed in addition to permissions.