Issue with L w/o pay deduction

I have encountered some error in payroll calculation and Leave with out pay deduction.

My payroll period:

Image

My salary component: (for LWP)

Image
Image

Salary structure:

Image

The problem arises because we follow Bikram Sambat (BS)calendar. Our months start at 14/15/16/17th of Gregorian calendar and end similarly.

While creating payroll entry, we process as per our BS calendar and select dates accordingly.
See this:

While selecting start date as 16-07-2024 (first day of the required month), the end date is automatically set as : 2024-08-15.
Image
But this is not our required end date. The end date of our month is actually 2024-08-16 this month.

If I run payroll with 2024-08-15, this is the result I get:
Payment days tab
Image
Income and Deductions: Please note LWP.
Image
That is correct.

But our month end date is 2024-08-16. Lets change that.

Image

Image

Image
Take a note of LWP deduction.
Please ignore multiple rows of Fuel and other earnings.

I am concerned about LWP deduction. With everything other data as constant, and only changing the end date shows a very erratic value.