I have a panel dataset with these variables

variable name type format label variable label
------------------------------------------------------------------------------------------------------
date float %tm
country str2 %9s
region str2 %9s
store str2 %9s
products str2 %9s
value double %6.3f
------------------------------------------------------------------------------------------------------

I first obtain the grand total of each country in each month and calculate aggregate year on year percentage difference as a check through
Code:
collapse (sum) value, by(country date)
g yoy=100*(value[_n]-value[_n-12])/value[_n-12]
which gives me this for a particular country
+-----------------------------------------------+
| year month value yoy |
|------------------------------------------------|
129. | 2020 9 206.399 -.1574302 |
130. | 2020 10 219.501 .0394334 |
+-----------------------------------------------+

Now, however, I would like to decompose this country total year on year by region, and by store in a panel setting. The data is harmonized and everything should sum up. I start from the beginning with this

Code:
collapse (sum) value, by(date country region store)
bys date: egen tot_value = sum(value)   // monthly totals match my initial check, so far so good for decomposition
And define the following panel

Code:
egen id = group(country region store)
xtset id date, monthly
sort id date
xtset id date, monthly
panel variable: id (unbalanced)
time variable: date, 2010m1 to 2020m10, but with gaps
delta: 1 month

Then for the decomposition I do the following

Code:
gen contr=100*(value-L12.value)/L12.tot_value
bys year month: egen tot_yoy=sum(contr) // should match growth rates from my initial check
And now looking at a particular region for an example

+----------------------------------------------------------------------------------+
| year month country region store value tot_value contr tot_contr |
|----------------------------------------------------------------------------------|
912186. | 2020 10 1country 1region 1store 11.874 219.501 -.3568568 .0802324 |
+----------------------------------------------------------------------------------+

I can see that the sum of contributions of each region's store in Oct 2020 (.0802324) does not sum up to the aggregate year on year for the whole country ( .0394334) even though the totals of each region's store for each month match the aggregate value of the country in each time period, thus by construction it should sum up to the total year on year. Can this be due to some rounding/precision issue? If so, I am not convinced that it warrants such a big difference. I don't understand where this divergence comes from. I would do this in a wide format, hence I would not need to deal with defining a panel for xtset here, but the dataset is too large to make this option feasible.

Thanks