I had surgery on my feet and they didn’t put anything on my eyes. Maybe it depends on what type of surgery one is having, but I never heard of it. I know for people who do lasik the put some to keep the eye area moist.
My husband is a surgical technician and he said he has never seen vaseline put on eyes when prepping for surgery but when awaking from anesthesia it is common to have blurred vision as if you had Vaseline in your eyes or some other clear coating were in your eye, but they do put a clear coating of lubricant over the eyelashes before taping the eyes shut before surgery so that when they remove the tape after the procedure is over the eyelashes dont rip out with the tape when it is removed. Some hospitals may use Vaseline for this purpose.
I can tell you what we do in veterinary medicine: anesthetized patients do not blink, so a lubricant is placed in the eyes to prevent drying of the corneas (which will cause ulceration).
They do put a creme or viscous fluid on the eyes on a patient in a coma or one on long term ventilator (for assisted breathing) who is unconscious to prevent the eyes from drying out.