Pi-hole V6 Custom Ports

Yes, that's what we've warned about in Introducing Pi-hole v6:

The exception to this is environment variables. You can start the container with the old variables in place but don’t expect them to work! It is recommended to read the docker section of our docs page before upgrading.

as well as the disclaimer for Pi-hole v6 Docker image:

!!! THE LATEST VERSION CONTAINS BREAKING CHANGES

Pi-hole v6 has been entirely redesigned from the ground up and contains many breaking changes.

Environment variable names have changed, script locations may have changed.

If you are using volumes to persist your configuration, be careful.
Replacing any v5 image (2024.07.0 and earlier) with a v6 image will result in updated configuration files. These changes are irreversible.

WEB_PORT was meant to pass a value to lighttpd's configuration in the container, in the case you ran a container where you can't have Docker map ports (and you typically wouldn't need to do both, like you did with -e WEB_PORT=8888 -p 8888:8888).
Pi-hole v6 doesn't use lighttpd anymore.

Depending on your Pi-hole container's Docker network mode, you can either map the port in your docker-compose or docker run script, or you tell Pi-hole's embedded webserver to bind a different port by setting FTLCONF_webserver_port.