After your feedback I’ve changed the show_expired=false to show_expired=true and the calendar has hidden the canceled events. After that I deactivated the custom plugin with the code and tried it again with show_expired=false with the result, that the calendar has hidden all expired again. I don’t know why but apparently the custom plugin had a problem with the the “false”.
Result: I’ve changed the code to show_expired=active and added that to the calendar shortcode. Now it works like it should.