That is probably not the brake pad wear sensor, that looks more like an ABS wheel speed sensor.
The brake pad wear sensor should clip into the brake pad, this is what I've always seen on floating brake caliper set ups on (on E36, E39 and F22 BMWs) and my M2's fixed caliper setup (but the Blue Brembo setup).
Note: there is usually only a brake pad wear sensor on front-left and rear-right wheels, they aren't on all 4 corners.
See RealOEM:
https://www.realoem.com/bmw/enUS/sho...diagId=34_2199
#2 is the brake pad wear sensor, it looks like it should be the same as on M2 non-competition.
Your photo is of the DSC pulse generator, #8 in:
https://www.realoem.com/bmw/enUS/sho...diagId=31_1121