Is entry possible with H4 based on H1 from previous employer?

Hi, I have H1B from employer A and my family has H4 based on this H1B. If I change to employer B and get my H1B transferred, can my family still enter US on the existing H4 ?

Is it really necessary to get the H4 transferred ? Can my family still enter with I-797 from the new employer at the port of entry ?

Please help with your advice …

Yes. Note that visa is only a travel document and doesn’t matter which employer name it has on the visa. As far as you have a valid visa you can travel to the US.
The H4 dependents will need to carry the copy of the current I-797 of primary H1B holder along with employment verification letter, copy of last 3 paystubs, copy of marriage certificate , copy of birth certificates for children and valid H4 I797s if available. Of course valid passport with unexpired H4 visa is required.

H4 is not transfered to employer as it is not tied to any employer but you do need to apply for extension of status for H4 dependents when you do H1B change of employer aka transfer. EOS is normally done when the applicant is present in the US.