Problem with MS Teams that affects the display of online status when using pihole and unbound

Your debug log all looks great, no issues. Is this only happening when using Pi-hole and Unbound for DNS?

Is anything being blocked which might contribute? You can disable all blocking temporarily (Disable Blocking > Indefinitely, and later Enable Blocking) and seeing if it behaves better then.

It would be worth temporarily trying it with another DNS server and seeing if the behaviour is consistent. You could start by switching from Unbound to different upsteam server and testing for a while, then try switching from Pi-hole to a different DNS, eg your router's, and testing further.

This should help determine if this behaviour is unique to using Pi-hole and/or Unbound. A search of Teams and status finds tons of articles and posts about dealing with inaccurate Teams status, so it seems to be an established behaviour for that product.