I had the same issues with my knee. I strongly believed that it was because my muscles were weakened. So I ask my GP to refer me to a physical therapist, who prescribed a program to help retain my leg strength.
It definitely helped! I was able to continue to run (slower and shorter distances but still running!) without knee pain throughout my recovery.
Lenora