Recently I have filed my extension to recapture my holidays and maxout was suppose to be on 12/13/2021 but due to some mixup with my Perm filing date, Lawyer requested my extension till 12/13/2022 which USCIS approved and I got my I797 petition copy with the new date. Will I be legally staying as my maxout is happening in 12/13/2021 but USCIS gave me till 12/13/2022? Thanks for the help.
Yes you can keep living in the US on H1B and work until the expiry of the new extension.
Meanwhile if your I140 gets approved, you can get further extensions beyond the 6 years H1B term.