I always took it as being quite a while after Empire, maybe several months. It’s possible Luke has returned to train with Yoda or on his own. I also think Luke passed a major test in his journey as a Jedi. He resisted the ultimate temptation. Yes, he had his “ass handed to him”, but he didn’t succumb to the temptations of the darkside, and was ready to give his life, rather than turn evil.
I honestly think that was surprising to Yoda, that Luke wasn’t tempted. If we’re to believe his training was more than just being a great fighter, then I don’t have a problem with Luke showing up as wiser and more capable.
In a way, Luke denying Vader’s temptation proved that the force was his ally. That was a major piece of the puzzle for the completion of his training. The final piece being to face Vader again, after having found the truth. I don’t know if Yoda thought he could bring Vader back to good, but I like to think Yoda and Obi-Wan had some foresight.