yes, I guess you need to work on a copy of the curve and apply your deformation modifiers there… and use_apply_on_spline active so you don’t deform the generated mesh but the curve
to apply shape keys manually you can create a new shape key from mix, set its mix value to 1, remove every shape key starting from the top… now the trick is to do that from python