I think pressure and quality of defense plays a factor. Against a Miami, no. Against Baltimore or Houston, yes.
Allen bails to buy time and give his WRs a chance to get open.
Similarly Mahomes constantly runs circles, zigs and zags while climbing the pocket, often times buying time to create plays.
One can argue the efficacy of these techniques, but Allen and Mahomes are more mobile than Rodgers, Flacco, Tua, and thus avoid sacks.