Urogynecology. Lots of recon to fix mechanical problems.
Pretty much any reconstructive surgical specialty: urologic male and female recon, ortho basically every sub specialty of it. Plastics other than aesthetics but even that probably takes into account mechanical. ENT. Probably others
general surgery doesn’t really fall under this IMO Except for breast recon, since it’s mostly removing things and not really focused on restoration of mechanical function unless you count peristalsis as mechanical function
There is no such field where a physician will focus on mechanical problems without a thorough diagnostic work up. Even surgeons will spend a large majority of their time doing diagnostic work ups to determine who actually needs to go to surgery. There is actually a very small percentage of patients who will actually make it to the OR.
What you are looking for is called engineering. Doctors aren’t engineers. A cardiac surgeon can install a new valve to help heart/blood flow mechanics, an orthopod can do a surgery to alter knee mechanics, but it’s more analogous to a carpenter knowing that a table needs a new leg to be level, rather than the engineer designing the floating staircase.