I think you got a couple choices.
One you could exec into the container and then try again.
2nd
docker compose exec es01 /usr/share/elasticsearch/bin/elasticsearch-reset-password --username logstash_system -u https://es01:9200
Or try localhost
If you look at the error message it says your certificate valid for
That's from the containers perspective