Qualified immunity is a shield from civil suits not criminal liability.
For example if paramedics are performing life saving functions and the injured party still dies those paramedics shouldn’t be at risk of law suit attempts to save life. The consequence is paramedics would let people die without life saving actions in full knowledge that in most circumstances their actions would prevent death because there is great personal financial liability for performing their jobs in some rare circumstances.