I tried it as well, doesn't work, I still get log messages.
One thing that may be related is that we use Serilog, but I am not sure if it's related.
I found similar topic at https://discuss.elastic.co/t/dotnet-6-0-log-level-setting/315258/2 and tried to upgrade my apm library but it doesn't seem to resolve the issue.