A different way to think about RDOs is they don’t really "accrue", instead think of it as banking hours that the employee has worked, so regardless of how many hours the employee has worked, eg 20, 30, 40 if they bank 2 hours RDO they will get paid 2 hours less, eg 18, 28, 38.
Using your example, on a week where staff take an RDO, 8 hours is taken out of their RDO bank, they will work 32, and bank 2 hours still. 32 + 8 - 2 = 38.
So even though they have worked less they still bank 2 hours RDO.
When requesting a week of annual leave eg 40 hours annual leave, they still bank 2 hours RDO so are paid 38.
Leave accrues on OTE (Ordinary Time Earnings) paid, so if 40 hours annual leave are paid, 2 hours are still banked as RDO, so annual leave accrues on 38.
If the employee takes 4 weeks annual leave that would made up of 19 days annual leave and 1 day RDO as the employee would bank 8 hours during those 4 weeks.
There are other ways to do it, but then it gets messy, example if the employee has 1 day annual leave you could pay out 7.6 hours then bank just 1.6 hours RDO but that just makes things more complicated and much harder to automate, especially if staff have half days personal leave.
Banking 2 hours every week is key to making it easy.
Some payroll systems let you set a static roster, comparing leave requests to the roster and automatically deduced 2 hours RDO every week, so RDO calculations can be fully automated.
I hope that helps.