You can refer to https://code.visualstudio.com/docs/devcontainers/attach-container#_attached-container-configuration-reference and add "remoteUser" in your Named Container Configuration File