A couple days before COTS-1[1] was to launch, a crack was discovered in the second stage nozzle. Rather than wait a month to fabricate and install a new one, SpaceX had a guy climb inside the rocket and use some shears to cut off the lower third of the nozzle. The rocket launched without issue.[2]
So while you're right that SpaceX doesn't typically do this sort of thing, NASA did pay them to fly an untested nozzle design.
1. https://en.wikipedia.org/wiki/SpaceX_COTS_Demo_Flight_1
2. See the section titled "Snipping the nozzle" at https://arstechnica.com/science/2020/06/forget-dragon-the-fa...