Spray insulation IS a bad idea directly on the roofing backing...BUT.
Consider that the recommended loft joist insulation level is now 270mm...that is huge and won't allow you to board your loft.
So on a new build there is no harm in using this spray stuff between your joists and boarding...