If you have reached the typical six-year limit on your H-1B visa and have applied for an extension past this limit through an approved I-140, you are still subject to your visa validation period.
However, while the best advice is to apply for your extension well before your validation period ends, you cannot predict or control how long it will take for your H-1B extension to be processed. For Employment Visa Process Visit UT Evaluators
Fortunately, the USCIS has a provision for situations where your H-1B validation period expires while the petition is being processed.
The 240-day rule states that you are permitted to remain in the U.S. working for your current employer throughout this period. If your petition is approved during this time, then your 240-day work authorization will end and your H-1B extension will begin.
However, if your petition is denied, this provision will immediately end and you will need to cease working and make plans for alternatives or to leave the country.
Can I Travel Under the 240-Day Rule?
Leaving the U.S. during this H-1B extension provision may result in you not being able to return to the country until you receive your new H-1B visa. For more details on H1B Visa check Kazembassy
Therefore, it is not advisable to travel during this time. If you need to travel, then you may want to consider using premium processing to expedite the adjudication of your extension petition.