I encountered myself with this issue.
My SessionID always matches fine with GlobalNetTravelCount.
But ClientID never matches with CachedClientID, the last variable is always +1.
LogHandshake: Incoming: Rejecting game packet with invalid session id (1 vs 1) or connection id (0 vs 1).
ClientID: Connection id incremented clientside every connection per-NetDriver, to prevent non-ephemeral old/new-connection crosstalk.
Now look at the following part of the code:
UnrealEngine/StatelessConnectHandlerComponent.cpp at release · EpicGames/UnrealEngine (github.com)
Why is this +1?
CachedClientID = FMath::Max(ConfigCachedClientID, 0) + 1;