There is no such thing as muscle memory. A muscle doesn't remember anything.
What occurs here is all the time and effort you put in the gym prior has caused the fascia of the muscle to stretch and expand. Once stretched, the fascia (barring disease or DNA deterioration) will always remained stretched and supple. So when you start back working out again, you reach the same size much quicker than it originally took you to achieve because the hard part of the job is over.
It's like blowing up a balloon. You can get one of the tiny ones and proceed to blow up it. Because it has never been use before it will require some effort. But let the air out of it, stretch the limp shell out a few times, you can then blow it up much easier.
It is the same concept with the fascia surrounding the muscle. A tight restrictive fascia will hinder gains no matter what training, diet or gear protocol you follow. 90% of the problems attributed to being a "hard gainer" is this very reason. (assuming your diet is in order)
This is why I have advocated for years on here that people pursue an aggressive stretching routine to do at home and/or incorporate the use of myofacial rollers that are designed to increase the flexibility of the muscle fascia.
Or you can have 3x weekly deep tissue and myofascial manipulation massages per week. Which is what I did for 4 years. But unless you are getting them free as I was, you better stick to the home stretching and foam roller method.