There’s plenty of evidence that even without an explicit memory of surgery, humans can form implicit or subconscious memories under anesthesia, said Dr. Aeyal Raz, an anesthesiologist at the University of Wisconsin.
https://www.nytimes.com/2019/01/30/well/mind/surgery-anesthesia-awake-consciousness-trauma-depression-anxiety.html?action=click&module=Discovery&pgtype=Homepage