He isn't eating what you want him to eat because you are engaging and giving him something to battle against.
Your job is to provide a healthy, balanced diet for him. It is his job to decide whether to eat it.
You can be sure that you will never, ever win. He decides what goes in his mouth, not you and that will not change.
You need to decide what food will be available to him. Make that available by placing it on the table without comment. Allow him to take what he wants but no more of each thing than you consider appropriate. He doesn't get to fill up on just the thing he likes so, if he likes chips he can have his portion but no more. If he chooses not to take any veg that's up to him.
When the savoury is finished, clear away and then allow him to take whatever you have decided is available for dessert if he wants it. Again he can have a reasonable amount but not fill himself up.
If he is hungry later he can help himself from the fruit bowl or wait until the next meal.
The key is not engaging. You have to be less than interested in whether he eats. Don't talk about the food except to limit his intake of the less healthy options. Don't praise him if he eats or encourage him in any way. Talk about lots of other things and make mealtimes relaxed and sociable.
Meltdowns and refusals to sleep must be ignored. He can always have fruit if he is too hungry to sleep. If he doesn't want the fruit he is not hungry and you are not interested.
He will probably use every trick in the book to get you to engage but, the moment you do, you have lost. Remember that he decides what to eat from what you decide is available to him.