Compose not behaving nicely with --context flag with a ssh host

Anyone know why official docs give a slightly different answer with only “%C”? Maybe it’s more compatible across linux?

I still get pretty frequent mux_client_request_session errors following docs with latest docker 23.0.5 and ubuntu 20 to modern ubuntu and centos.

# Not good enough, still leads to errors?
ControlPath       ~/.ssh/control-%C
ControlPersist    yes

I switched to the suggestion above and it seems to be really working. Will try ControlPersist 5m but might try no.
ControlPath ~/.ssh/socket-%l-%r@%h:%p