Had the same issue with fans spinning up and down all the time, and ended up using GitHub - TamtamHero/fw-fanctrl: A simple systemd service to better control Framework Laptop's fan(s) - I set it to always run the fan at low RPM even under 40C, this guarantees that the fan is never turning off and on.