EDIT: the issue has been solved on Microsoft side. Probably it involved a wrong pwsh executable path in the online shell (notice the 7-preview in the pwsh path shown below).
This is the error causing the premature exit of the shell
/opt/microsoft/powershell/7-preview/pwsh: symbol lookup error: /opt/microsoft/powershell/7-preview/libmi.so: undefined symbol: SSL_library_init
obtained via a subshell
See also this Powershell issue here:
SSL connection does not work on Debian 10
EDIT: the proposed solution from Microsoft is not needed anymore as the issue disappeared.