Together with the MathWorks support we're able to solve this problem. In our case, there was no standard port assigned for the SSH connection by the IT department. Matlab looks first in standards defined by the operating system in the folder "C:\Windows\System32\drivers\etc\services". There should be an entry for the port 22, which in our case wasn't there.
ssh 22/tcp #SSH Remote Login Protocol
Next issue was the adress format of GitLab for the SSH-path, which is in the "scp" format, when using the adress directly from GitLab, which does not allow to select the port manually. In order to do this, one has to use the standard SSH syntax (See version control - Git on custom SSH port - Stack Overflow)
- standard syntax ssh://[user@]host.xz[:port]/path/to/repo.git/ (Variant to manually choose the port)
- scp like syntax [user@]host.xz:path/to/repo.git/ (GitLab standard)
Changing the repository adress to the standard syntax with a defined port, resulted in getting the SSH-connection to work properly.
For an existing project, changing the adress from "https" to "ssh" did not work. The workaround here was to import the project directly via Home--> Import from Git to a new sandbox folder.