Life is a series of compromises. Whether you prioritize your work or your health is up to you, and I believe worth continuous debate.
You can prioritize both, actually. If you can keep your eyes focused at a longer distance while you’re working, you won’t develop nearsightedness/myopia.