Sounds like using noscript and only allowing sites that do not do this would prevent this type of tracking.
Great point.I'll add that, Vanadium, the GrapheneOs rebuild of Chromium, has a very nice interface for enabling JavaScript one site at a time.Of course, I also won't install apps made by Meta or Yandex.