Did anyone find the ending of ending of Bon Appetit, Your Majesty confusing?

I still cannot figure out what really happened. like how did the king come to future?