THere is a middle ground which is this: https://www.wienerberger.co.uk/products/roof/in-roof-solar.h...

The big problem is that because there is no real ventilation, the panels get hotter and don't produce as much power.

What you put under them also has an effect on how waterproof your roof is long term, plus when you need to replace them finding ones that are the right size are also a pain.

There’re commonly used on new build houses in the UK — new roofs in the UK have a waterproof but breathable membrane under the tiles

Also see https://roofit.solar/ used in a few houses… mainly self build a or architect designed