An answer on Stack Overflow
Why does /etc/hosts not work anymore for some websites on Big Sur?
gives as answer a new DNS feature added in order
to speed up access to sites that support HTTPS,
but which unfortunately may workaround the hosts file.
I quote the answer here:
macOS 11 added support for what is officially called “Service ...