Group of stacked bars and use of property offsetgroup

Hello,
I aim to plot a bar chart, depicting the monthly warehouse evolution. In this warehouse, there are several items, which can be aggregated in “categories”.

I used the property “offsetgroup” to plot what I need. However, by default, the bars representing the categories are displayed as “group”, while the bars representing the quantity of each asset in each group are “overlay”.

I enclose a picture to illustrate what I currently have, and what I would need:

Documentation describes this behaviour:
offset
Shifts the position where the bar is drawn (in position
axis units). In “group” barmode, traces that set
“offset” will be excluded and drawn in “overlay” mode
** instead.**
offsetgroup
Set several traces linked to the same position axis or
matching axes to the same offsetgroup where bars of the
same position coordinate will line up.

Problem is, if i set “barmode=stacked”, then each bar is stacked in the same bar. I need to have the bars inside each category only, stacked, instead of overlayed. How can I change the default logic ?

KR

David