Can i travel India and come back USA with 45 days of H1B Visa validity with no problem at port of entry?

Hi There,
Please help me by suggesting a best option,

My Visa get expired by July 24th 2019, i have a mandatory travel to India in the Month of May and i am expecting to return USA by June 9th 2019. i see options as written below but not pretty sure which is the best suitable one for smooth trip.
Option1: Return back in the month of June and then apply for H1B extension in Premium , but my concern is , will I be questioned or blocked at the port of entry showing you have just 40 days of Visa and extension is not applied? if so i have to go back to India ,file an extension and then travel to USA which may take 3 to 4 months as i work for an Indian consulting company and I am not ready for that
Option2: Apply extension by second week of April ( it is taking lot of time inside an Organisation before it is getting filed) and wait for the result, if i get an extension in 15 days i am good but if it goes to RFE , my organisation will take another 2 months with which i can not make for May travel.

One other option is , i can postpone the Travel to Aug but it is very difficult to postpone as it is personal emergency but at the same time dont have guts to face the port of entry or RFE.

Legally, you can enter into US on the last day of your Passport-stamped visa validity.
But practically, the CBP officer at POE may ask you for the late reason. If your answer make good sense, there will be no issue. But if you have an intent to manipulate the system without proper reason, they may drill down.
In your situation, you can apply for H1 Exnt at any time, travel our side US and enter back before your current Passport-stamped visa expired. Give a tangible, simple to undersand reason if the CBP officer asks at POE.

Hi,
Thanks for reply, but my 1797 is there only till July 24th 2019,by which i will have 40 days of validity,still you suggedt to apply now and with or without an answer i can come back USA just that i have to manage POE wisely?