Help!

So I don’t get home til 8:30 every night so I eat dinner at around 9:30 every night because I shower and my dad needs time to make dinner. I can’t ask him to make dinner in time before I come home. He’s weird like that. But I know it’s bad I’m eating all these calories at 9:30 then laying down then going to sleep. That’s how people gain weight. So what can I do to fix that?? If I ate then took an hour and a half for my stomach to settle to work out it’s already 11. I just don’t know what to do and I don’t want to gain weight. I always ask him to make healthy things but he always ends up making spaghetti or pizza. I get home late because I go to school then I work at a call center til 830 so I’m sitting. I’m also 17.