There are various OSS notes available in service market place for a source code correction for valuate goods receipt of multiple account assignment.
I would suggest to search OSS note for the same. Else, please raise an OSS ticket to SAP for this unique behavior.