H1B extension pending - out of status/denial due to travel & re-entering US

My current H1b expires in October, applied for extension in April which is pending. I-94 end date based on past H1b visa is Oct 12, 2023. Recently traveled to Canada for 2 days and re-entered US, got the new I-94 end date as Oct 12, 2023.

  1. Now after my H1B gets approved, will I be receiving I797-A or I797-B in this case? if I-797A, will the end date of i-94 present on new I-797A approval notice be the last action one?
  2. Does it supersede the previous I-94 issued by CBP during my travel? Or should I re-enter the country before Oct 12 to get new I-94 end date?
  3. I was told by an attorney that the extension petition will be denied as I traveled out of the country, is it true?
  4. Also, in case if do not get the H1B decision by Oct 12- will the automatic 240 day rule to stay & work still apply as I traveled out of country while the extension is pending?