I would not be surprised if the sensor is permanently paired to the keyboard's controller chip, and then there's a load of security involved there to keep you from swapping the sensor on the keyboard itself.
Still, better to replace a $100 wireless keyboard than a $1200 computer.
Re:All-new iMac features the M1 chip
by neurostimulant on Tuesday April 20, 2021 @05:52PM
(#26882309)
The keyboard probably has a T2 or similar chip, or even basically an apple watch without a screen.
Because in this case you can replace the keyboard and keep it secure, which contains the Touch ID sensor.