I kept most of the leg strength and muscle mass with even just this but my whole upper body basically went back to not looking like I lift at all.
The upside though and what proves your point around muscle memory is as I'm writing this it has been 12 weeks since my second surgery finished. I started going back to the gym after about 6 weeks with the lightest dumbells on the rack, literally starting from 5lb on every exercise.
In just this 6 weeks I basically look like I never stopped lifting and have approximately 85-90% strength back on all of my upper body lifts (for example 6 weeks ago I couldn't even bench press the bar and struggled to do 10 reps with a 5lb db, yesterday I'm back to hitting 225 for 6-8 reps) and I'm sure if it wasn't just due to surgeries and was just a long break I'd probably be back at 100%, that's how powerful muscle memory is.