Out-of-body experiences on operating tables seem not to be so uncommon. General anesthetic is a weird thing that is not properly understood, or at least was not understood fifteen years ago, when I heard a lecture from a professor of anesthesiology. He began by stating clearly that medical science knew nothing more detailed about exactly what general anesthetic does, other than that it makes you lose consciousness. Since it is not known exactly what consciousness is, it is not surprising that we don't know exactly what losing consciousness is, either. The point is that GA is a powerful psychochemical effect, and it seems likely that it can sometimes induce hallucinations such as OBEs.
Patients are wheeled into the room conscious, and get a good view of everything around them before losing consciousness, albeit from a prone perspective. I recall from an article I read once, that OBEs typically report seeing things from above. But it is well established that the brain does an enormous amount of processing on sensory data (including remembered data) in order to generate our conscious impressions. It is very interesting, but by no means proof of actual out-of-body perception, that the subjective experience of an OBE is a view of a previously viewed scene, but from a different perspective. We often see familiar things in dreams from unfamiliar viewpoints, so the brain is clearly capable of this kind of shift.
The big point is just that there have been a lot of cases of OBEs in surgery, with a lot of highly qualified witnesses immediately at hand. But no smoking gun case of a patient accurately seeing something "externally", which their physical eyes could not see and had not previously seen, has ever been presented. This makes it very difficult to interpret these phenomena naively, as genuine "exterior perception." The theory that they are a kind of drug-induced hallucination seems much more plausible, given the evidence.