In 2.90 they switched to the new boolean (Fast/Exact solver).
the bpy.ops.object.modifier_apply no longer has the apply_as option. I only quickly tested, but if you remove that the script seems to work just fine in 2.90, 2.93.2, and 3.0.
change: bpy.ops.object.modifier_apply(apply_as=’DATA’, modifier=”Boolean”)
to: bpy.ops.object.modifier_apply(modifier=”Boolean”)