I have the same exact problem with a 2021 M3.
I have stopped using the "auto" open feature and initiate the open manually. The door still occasionally loses its memory, but not as often.
I subscribe to the theory that Tesla homelink is sending out repeated signals.