I have had a similar issue for a long time.
The deal is that I’m always using a simple Own Server hosting type for local target, instead of using Docker (I just don’t see the need for it in local dev).
But for all non-local targets I’m using Docker.
So when switching from one to another, the package is changing. And it causes Redis to stop working on non-local targets.
I can prevent this if after switching to deploy target, I turn off and on the Redis in target settings.
W 5.2.0.
NodeJS
Win10