If the dog is awake when it's dying then they will die with their eyes open.
For the dog to close it's eyes requires control of the muscles and when the dog dies it does not have any muscle control to close their eyes.
If the dog was asleep when it died then the dog would die with it's eyes closed but if the dog is awake the eyes will be open when the dog dies.
Even humans that die while awake will sometimes die with their eyes open.
Then at the funeral home or in the morgue the eyes are closed by the workers there.
If the person dies in their sleep then the eyes will be closed but when awake the eyes are open when they die.