The law on employment contract allows you to leave work for compelling reasons. The illness of your child is indeed a compelling reason, but you can leave work only if you have no other choice and no other way to take care of him.
You can take days off work to take care of your sick children but only the necessary time. Compelling reasons only gives you the right to leave work for 1à days maximum if you work full time. You have to inform your boss as soon as possible that you are leaving. Proof might be asked so you will need a sick note from the doctor or your kid’s school.
https://www.jobat.be/fr/articles/pouvez-vous-rester-a-la-maison-si-votre-enfant-est-malade/