Are you sure you are connecting to the container, not something that runs locally on you machine?
Port mapping on a running container cant be changed, you should stop the container and restart using the correct directive in the Docker compose file.
Compose file version 3 reference.
in my case...