Discrepency in capturing custom dimensions value

I was using Google Analytics previously to track data and switching to matomo now.

I am passing the value from the code.

My question is I am getting a discrepancy of 40% (approx) to Google Analytics.

How to get the accuracy?

Thanks in advance