If you are filing your 2022 U.S. tax return from a foreign country and are eligible for the automatic 2-month extension, your return must be postmarked by June 15, 2023, to be considered timely filed.
According to the retrieved information, a tax return is considered filed on time if it is mailed from and officially postmarked in a foreign country on or before the due date, including extensions. This means that as long as your return is postmarked by June 15, 2023, it will be considered timely filed by the IRS.
Sources:
Publication 519 (2023)
Publication 54 (2023)
Publication 1380
Notice 2021-21
Publication 516 (11/2018)
§ 7508A. Authority to postpone certain deadlines by reason of Federally declared disaster, significant fire, or terroristic or military actions