Visual Studio 2022 Docker v24.0.2 Ports error Docker Compose (Failed to load) The project system cannot open the file

Hello. I think I followed all the instructions and managed to get an API in one container and an MSQL version with an additional base in another and run them together with Docker Compose. So I’m happy. The problem (there’s always a problem) Well, actually there are three problems.
The first is that when I press docker’s Compose button in Visual Studio 2022 in debug mode, the api swagger kicks in and if I run an endpoint, it connects to the other container’s database with no issues. But if I want to do it in Release mode, the swagger appears but does not connect to the database.
The second problem is when running in release mode, I can see the container group running but the API doesn’t show up on the same port as in VS Debug mode, which is https://localhost:59566/swagger/index. html. The same happens if I first modify the docker-compose.yml file, changing the name of the image to that of the same image but it is in Docker Hub and I remove the build instructions. I run docker-compose up -d but the API doesn’t show up on https://localhost:59566/swagger/index.html or any other port listed on Docker Desktop.
And finally, when I copy the whole project to another computer, (I create a zip that includes everything) and unzip it on the new computer. When I open VS2022, it says in the project Docker Compose (Failed to load) And below that message it says: The project system cannot open the file.

Thank you in advance for your help.