If I forgot to lean at the time to eat Matzah, I am required by Halacha to eat it again. If when I am going to re-eat it in order to do the leaning my Rebbi Muvhak walks in, what do I do? You don't lean in front of a Rebbi Muvhak, but the only reason I am re-eating is because of the original forgetting to lean. Now Halachicly what do I do if asking my Rebbi to lean is not an option neither is waiting for him to leave or other solutions?
There's a similar case discussed if you forget e.g. yaleh v'yavo by mincha and only remember after nightfall. You repeat shemoneh esrei even though you don't say over yaleh v'yavo. It seems like it doesn't accomplish anything, but at least that shemoneh esrei was done correctly. So perhaps here too, the eating would be correct even though not leaning. Though it may be different, because the leaning is really a separate thing.
Rabbi Chaim Kanievsky was asked this question (here) and ruled to re-eat without leaning. He does not provide his reasoning.
This is not a Psak:
I will assume that if you are up to Matzah or later when your Rebbi Muvhak walked in then he clearly is not there for your Seder. If that is the case, he clearly is not at the same table. According to the Rema in OC 472 5 even if you were eating your matzoh in the first place you would be required to lean. Pri Hadash says you may not lean in such a case. And MB quotes Pri Migadim as saying that it is better to get his permission.
However, here we are talking about making up the incorrectly eaten matzoh. According to Rem"a, you should definitely eat it leaning.
I believe that even according to Pri Migadim, since this is a make-up for what you were not yotzei before (because at that time you definitely had an obligation to eat it while leaning and now you must correct that) then the concern that PM has for those opinions that require permission is flipped: The Rem"a holds you are obligated now, even in the presence of your Rebbi Muvhak, to lean. This eating is a make-up for when you should have leaned. So you must lean without his permission.
According to Pri Hadash you would not be required to lean and it would be like making up Minha Amidah after Rosh Hodesh by Maariv without Ya'aleh VeYavoh because you missed Yaaleh VeYavoh at Minha.
It sounds like it could be an Ashkenaz / Sefardi split on your question.
If my assumption is wrong, and your Rebbi sits down at your table, I am trying to figure out the reality as to how one would find himself in such a situation. This sounds suspiciously like the type of case that the Ba'alei HaGemara would close with a resounding "TEIKU!"