H1B Visa Stamping - Employer A to B Transfer, Can use old stamping?

I have returned back from US to India in September 2018 since my employer ‘A’ has cancelled my I797 approval petition.
I am currently in India and my H1b Visa stamping is going to expire in Jul 2020 for employer ‘A’.
My I140 was approved in 2015 and withdrawn by my employer in 2017.

If employer ‘B’ files for I797 and I797 gets approved, Can I travel using the same Visa from Employer ‘A’ for Employer ‘B’ in the month of May or June?

Is there any specific time period that I need to travel with the same visa for employer 'B’or do I need to go for stamping using I797 filed by Employer ‘B’?

Yes, you can travel, if the stamp is valid.
If you do not have visa stamping valid at the time of entry, you need to get it before you enter US for Employer B.

Read below

Kumar,

My situation is slightly different. I have resigned on 20th Aug and employer has revoked my petition on 04th Sep while we ( along with my family) have traveled back from US to India on 5th Sep.

Am I still eligible to come back or am I out of status ? If we are out of status, does my dependants ( H4 Visa- My son) would face a problem in the future to apply for H1B or to get Green Card?

Your employer can only withdraw the petition, they cant revoke.
You were not out of status, it is fine.
No one will face any issues. Don’t worry.