Exiting spectation of a mob resets the shader
When you have a shader active and you spectate an entity, whether it has it's own shader or not, it will adjust your shader to match what the entity sees (usually default shader) which is fine, but when you stop spectating that entity it sets your shader back to default.