Halachipedia says
If one forgets Yaaleh VeYavo at Mariv/Arvit once one finished the Bracha of Retzeh (and all the more so if one finished Shmoneh Esrei) one doesn’t return to the Bracha or repeat Shmoneh Esrei. The same is true whether it is the first or second day of Rosh Chodesh.
I always understood the reason to be that Rosh Chodesh was not proclaimed at night.
It is possible to daven Maariv after Plag Hamincha see here for example . The opinion that one can daven Maariv then holds that after Plag Hamincha it is night. But practically it is before sunset.
So my question is if someone left out Yaaleh VeYavo at Maariv (after Plag Hamincha Erev Rosh Chodesh and before sunset or even night) would he have to repeat the Amidah?