Codespace environments are backed with development containers (dev containers for short). They are supported by other tools, for example, Visual Studio Code.
And even though Microsoft maintains both Dev Containers extension for VSCode and GitHub Codespaces, they behave differently in some aspects.
This article shows one of the bugs, which is related to Automatic Port Forwarding.