Port of entry with 45 days of H1B validity

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

I have visa till August 14, 2022 and my extension will be filed early March and planning to upgrade it to premium, so hoping visa will be extended by April.
I need to go to India in June for a family event(cannot be missed) hence looking for drop box appointments but the early available date is Nov 2022, I cannot stay for more than a month based on my company, so will be returning by June 30.
My questions are:

  1. Can I return back with 45 days of H1B validity and new H1B approved but not stamped in India?
  2. Though my H1B is approved, my dependents H4 may not be approved(as H4 is taking a long time), so can they return back with me?

Thanks.

Yes. Visa is just a travel document and you can enter the US as far as it is still valid. You can even enter the US with just one day left on your visa, no issues.

Yes, as far as they have a valid H4 visa to travel to the US.

Thanks, Kalpesh for the response. Much appreciated.
I was asking this question because my employer advised me to have at least 2 months of valid visa. So, I was trying to find how the port of entry officers are generally when they see somebody entering with just 45 days of visa validity.
Your response gave me an idea that I can travel confidently with stamped visa expiring in 45 days from the travel date. Thanks, again.