But your worry is unnecessary.
This condition is called "intraoperative awareness" and is considered as a complication of general anesthesia. In fact, the incidence is very low.
Anesthesia and surgery are risky, and if there are serious complications, the consequences may be serious.