I myself graduated from IGNOU in 2022, and have been studying for UPSC exams since then.
Yes, of course, you can sit for government exams after graduating from IGNOU via distance education. After completing your graduation from IGNOU you can apply for various central and state govt. jobs like railways, banking, SSC, UPSC, etc.