After update: ERROR: ServerIPv6 Environment variable (fd01::XXXX:XXXX:XXXX:XXXX) doesn't appear to be a valid IPv6 address

You are running Pi-hole in a Docker container.
Note that by default, Docker is IPv4 only, so a message about IPv6 network issues is somewhat expected at Docker startup (see also this similar topic back from 2018).

Your debug log suggests that Pi-hole is handling DNS requests from IPv4 clients as expected, so I am not sure what your issue would be.

Apart from those log messages, do you observe any DNS related irregularities?