One method would be to install 1x1 wood strips alongside the rafters under the roof deck then cut rigid insulation to fit between the rafters against those wood strips.
Why insulation should not contact roof deck.
A warm deck assembly is essentially spray foam insulation applied directly to the rafters and underside of the roof decking with a vented sheathing assembly over that to apply underlayment and shingles.
This provides insulation properties as well as allows for venting of the shingle system.
Warm insulation is installed on the underside of the roof deck at the top of the attic just below the roof decking.
Generally 40 of the total assembly r value should be above the roof deck.
The roof deck is cold wood decks without insulation above them will readily equilibrate to the exterior temperature.
The moisture is held in place by the insulation which allows for damage to the framing and other building components.
Before adding insulation at the roof you should consider creating a vent space to reduce risk of moisture issues.
I understand you are insulating the top of the attic space at the.
During cooler night times and in winter periods the deck temperature can then be below the dew point of the interior air.
This is why a deck can be shady but extremely hot during summer.
Batts secured to the deck with insulation hangers between top chords or more commonly tension cables secured at the ridge and eaves with eye hooks to prevent fall out.
But spray foam insulation used at the underside of the roof deck would need to be covered by a thermal barrier and intumescent coatings are commonly used.
Here is a fact.
High r value unvented roof assemblies will require a proportionally larger amount of insulation above the roof deck for condensation control.
More insulation is needed above the roof deck in colder climates and where indoor relative humidity is above 35 in winter.
Without deck insulation this heat is absorbed by the roof and transferred through the roof into the space below the roof effectively the entertainment area.
T he problem with the insulation against the sheathing expands.
The solution is not to ignore the insulation but to add one component.
Everything i have read states that insulation should not contact the roof deck so that air coming from the soffit vents can dry the underside of the roof deck and you certainly do not want to seal the opening between the roof deck and the top plate or there would be no air flow.
This may sound like i am suggesting not to have any insulation in place.