There is a related concept called grease the goove if you want to Google.
Now, regarding learning, while some parallels between muscle building and studying exists, I find it a stretch. Yes consistency is often key, but now suppose that instead of focusing for 1h every day on difficult problems I only do 5min, certainly it will work, I'll learn stuff, but not as much as someone doing consistently 1h study.
Recovery time is important in study and muscle though
Were you completely resting between sessions? How’s your sleep?
For muscle size, going to maximum is optimal, but it's less optimal for strength.
Their example was: instead of doing 8 reps of bench press where you can barely get the final rep, do maybe 1 fewer. They were more precise in the point to stop, but it's not something avg person can detect compared to their analysis, so this is just ballpark-ish.
I think learning is more like growing plants, you don’t need to get everything perfect, or even one thing perfect, but a set of things to good enough.
There are a lot of things that interfere with learning so the presence of those will inhibit learning regardless of effort.
you either lost significant weight, or added significant muscle .. no other way .. the end result here is more significant than how you reached it
for pull up, loosing weight is usually far more important than adding muscle, so i am leaning toward you lost weight
I can see weight loss being a significant factor for heavier people, esp. those that are heavy and strong. I am definitely neither (typical things like bench press / squat etc I used pretty light weights).