After trying the proposed [solution][1] and seeing that it still doesn't work.
The original code says to define MANPATH as explained in the man page, but when the man command reads the file, it append to MANPATH. So any command that exists in system man path (/usr/share/man, /usr/local/share/man) and was installed with brew, will show the man page inside of the system man path.
I started testing until I found a solution.
sudo mkdir -p /usr/local/etc/man.d
sudo tee /usr/local/etc/man.d/homebrew.man.conf <<'EOF' >/dev/null
manpath "/opt/homebrew/share/man:$manpath"