Getcha some of this
https://www.domyown.com/boracare-with-moldcare-p-1265.html?keyword=bora care with mold care&gclid=Cj0KCQjw-Mr0BRDyARIsAKEFbedG8cHv7Vde3gR0lKe1gESRtu5VU2WJMB0LmJvRMikenf9ocaxXEgAaArvFEALw_wcB
This stuff is AMAZING. It's really a simple old school wood treatment, Boric acid, with updated packaging. The mold care is more than just boric acid, but it works incredible. It's a pesticide, fungicide, and mold control. But it also protects wood from moisture damage. And it lasts forever. I worked for a huge international company, and we used this to treat wood in crawl spaces. The mold literally will just drip off.
I will never recommend a product I havent used extensively, and I can tell you with certainty that this stuff works. It soaks into wood up to an inch and a half, and actually works better on wood that already has a high moisture content.
From what I understand the boric acid (some kind of salt) preserves the wood fibers and protects them from moisture related damage. Whatever it is, it protects wood forever.
I'll give you some tips though, as this stuff is potent to plants. It will kill the shit out of grass for years and years, so dont apply with your plants and stuff in the attic. Dont get it in your eyes, I did once, thought i was gonna go blind as it crystalized in my eyes. Little water washed it right out.
Put down plastic, apply heavily, let it dry. Remove the plastic (it will look like a layer of salt Crystal's on top of it), and you're good to go. You could build a sauna in the attic with no ventilation system and the wood wouldn't mold or rot.