Honestly not sure😭. You might want to check the guide for the quests, and days where specific things occur, to see if there's anything you didn't do that could be causing you to get an ending without him. A lot of the story/plot relies around you fulfilling those quests with npcs before a specific day occurs, while also needing to max their affection out. So if you happen to do any of npc quests too late or fail them, that could perhaps trigger an ending you don't want?🤷♀️