ApplyingLeave after Payroll is Processed

I’ve read here in one of the posts that Payroll processing is dependent on Leave Applications - (Meaning Payment days are calculated based on leaves applied and approved. In that case, why does the system allow the leaves to be applied for a period for which salary is processed? If a HR user submits salary slip for a month and then applies a leave (LWP) for the same month - it will not reflect in the salary.

Please add this to GitHub as an Issue.

@rmehta aised issue #3981

(I forgot to add it here…)