I replied in this thread because the solution didn’t work for me, and it was mentioned as one of the possible reasons to write in a solved thread.
Perhaps it’s better to open a new one.
Update: VS Code OH 4 - Error while connecting to the openHAB REST API