When you check it thoroughly you can understand the logic.
What you do Apply leave for 3 hours
and create a over time record for 4 hours and in such cases system reduces 1 hour leave and out put comes as 2 hours.
If this is correct then the logic is check planned working hours "8" and check leave hours "3" 8-3 = 5 hours now check attendance details "5" 5+5 = 10 hours attendance compare with planned working hours 10?8 so 10-8 = 2 so no need of 3 hours leave make it to 1 hour leave since employee is worked more than 8 hours attendance same is adjusted with leave.
check any enhancements or PCR's written for the same so that we can modify it as we required.
Go through log you will get an idea.
Regards
Venkatesh