Extras/other people in the background are acceptable to meet the criteria but ideally with no human/entity on the screen at all that isn’t played by the same actor.
Movies like ‘Men’, ‘Moon’ or ‘The Nutty Professor’ don’t meet this criteria for example, due to the exceptions of characters played by other actors.
And it has to be somewhat mainstream and not a low budget student film or something.
Edit: I also meant that they play multiple characters…
Wasn’t Tom Hanks the only actor in Castaway? Unless you count the volleyball.
Not for the entire movie. There are scenes before and after his time on the island with other people.
It is the same reason why Moon wouldn’t work. Sam Rockwell is playing the main characters, but you have a significant voice acting role and several very minor characters.