Automatic Depreciation Entry Does Not Inherit Branch from Asset

We are facing an issue in ERPNext 15 related to automatic depreciation entries. When adding a new asset and enabling the depreciation schedule, the system successfully creates the depreciation journal entry, but it does not assign the Branch to the entry, even though the asset itself is linked to a specific branch.

How can we resolve this issue?