While I don’t know if this is true for all model of planes, black boxes are designed, in the event of a water crash, to disengage from the plane and float to the surface.
Name one model aircraft that has this magical mechanism.
No they don’t disengage themselves and float to the surface. Anyone interested in facts could Google “flight data recorder mount” they are designed to slide into a rack and are secured by two threaded caps that screw down over fingers at the lower front face corners of the FDR and CVR. Just like most all other rack mounted avionics components in Boeing aircraft and Airbus too.