A number of US corporate employers have short term disability as part of their benefits, and many US surgeons will give you the paperwork for filing a multi-month claim. So you need a cooperative surgeon (most are, ask them before surgery) and short term disability benefits, at least in the United States. Usually it’s encapsulated enough that the employer doesn’t know any details of the surgery.
Personally I kept working and still am with a few days off here and there, but it was an option. I’d probably tell anyone in the future who has these benefits to use them unlike me, since now that I’m at the end of lengthening I think it would have been one less point of stress during the process.