I went to a silent film festival last night. The final film, titled The Last Man on Earth" is a comedy much of which takes place after a plague has killed all men under fourteen. So women are police, soldiers, and politicians. The US president is female, her name is Alice Pratt.
Granted. she was president pretty much because there were no men. But would this be the earliest depiction of a woman as POTUS?
Also, here is an article from Smithsonian.com on “The History of Women Presidents in Film”. The author doesn’t even seem to be aware of the film you mentioned (given that’s it’s only mentioned in a editor’s note) and starts with Project Moon Base from 1953.