Go with both, is actually the best answer for most attic situations. Cellulose, as you indicated, doesn't stop air movement too well & is much more effective in truly dead-airspaces. But, Cellulose is very much less expensive.
Rigid foam panels however, are very air stopping & even convection stopping, which can also feel like air movement to you & Cellulose. Yes, Rigid Foam can be stacked as thick or deep as you want, but it's very costly compared to Cellulose.
The proper setup is to always install Rigid foam on top of Cellulose. In picture #1 you'd want the Rigid foam 1-inch away from the roof deck, for roof ventilation. Then, you'd fill between the ceiling & Rigid foam with Cellulose.
Similarly, for picture #2, IF, the gable end had a vent or looked something like an unfinished picture #1 with that window being the gable vent. Then, you'd blow your Cellulose in first, to then lay Rigid foam on top of it to seal the Cellulose from air movement for a cozy dead-airspace.
However, for picture #2 as it is with no venting at all, then Cellulose by itself is fine, but you want to pile it up as much as possible to abate convection from penetrating too deeply. And, if it's affordable this space would be best suited for stacked Rigid foam panels fitted tightly between the joists for a floor to be laid on top for attic storage. This would give you the overall best thin insulation or non-intrusive insulation.
The final trick for just Cellulose is to first & foremost line the naked space with 6-mil plastic as your vapor barrier so the Cellulose doesn't get wet & create a structural problem or lose its thermal value. This can be large sheets that Cellulose holds down into each joist bay by itself or you can even cut slightly oversized strips of plastic to lay within each joist bay. Any seams should be taped with aluminum tape or specific vapor barrier tape.