I was in a similar situation. I was given work with deadlines where it's impossible to do them in the regular 40h work week. I also saw other people not leaving at 5pm so at first I felt pressure to also keep working not to be "the new one that from day one is not working enough". I even once went at 6pm where he "joked":
Where are you going? It's not even night yet.
After some time I basically got a mental breakdown (I was waking up in the middle of the night, not able to sleep again fearing I won't be able to finish my work on time). At some point I had enough and went to the boss and asked to speak to him directly, explained that I can't continue working like this, and if things don't change, I will be forced to look for another job. Sounds like a threat, but I really didn't want to change my job, nor did I wanted to continue like this.
Then came the famous saying from my boss:
But I come to work every day at 6am and work basically till midnight.
Then, I said it's all great but it's something YOU WANT (started YOUR OWN company, you get all the benefits of its success). It's not something that I want. Basically explaining him that I have no extra benefits of staying late in comparison to him, and therefore I see no valid reason staying late or working overtime unless its critical to the entire company.
He basically just stood there, knowing he can't argue with that so he "had to leave because of a meeting" and we will continue speaking later on. In the end, he cut some unnecessary tasks from the team, and I went freely at will without him ever making any comments about it. I still did do my 40h and I did stay longer when I felt like it (was super focused and work was interesting) but I didn't have any issues again on this topic.
The takeaway is, you need to ask directly whats the "expectation", and stand firm on your ground that you work the hours agreed by the contract and that other people staying longer is their personal choice and that you have other wishes.
Only thing is, you need to evaluate how freely can you speak to your boss, as I was back then in a situation where either he cuts the slack, or I will quit. I had basically nothing to lose, but he really had a lot of work and losing a good employee would do more harm than good. If not, you should probably search for another job, and then when you have another offer, talk to him, if he insists on continuing overtime you can freely quit.