I was thinking the same but then browsers have caches and most of the CDNs (e.g. jsdeliver) set max-age to a year and immutable so you're only tracked once
For privacy reasons caches are per site these days. So even if you visit 1 page using a CDN and it is cached, if you visit a different website using the same CDN it will be downloaded again.
> My browser caches downloaded CDN libraries, doesn't that protect my privacy?
> Sadly, no. Even if the file in question is stored inside of your cache, your browser might still contact the referenced Content Delivery Network to check if the resource has been modified.