I know the feeling (as do many here) of being on the verge of getting back to normal function, and then losing it all. Words cannot describe how much that sucks. But your situation is definitely not hopeless.
What you describe sounds more like subluxation than dislocation, though I might be wrong. And it's surprising that your left knee is better after a lateral lengthening. For a loose kneecap it doesn't make much sense. Also, after your left knee was operated on, you most likely favored it and that's why now the right one is complaining.
Has your doctor checked you for any rotational problems? The fact that it only started two years ago might mean that the problem was there but was never aggravated enough to show symptoms, kind of like my knees.