delete shapekey keyframes with python
Object animations are at object level (like location).
Shape keys animations are as its own data level. Add the line below:
import bpy

context = bpy.context

for ob in context.selected_objects:
    ob.animation_data_clear()
    ob.data.shape_keys.animation_data_clear() # &lt;&lt;&lt;&lt;