Multiple DataView generated with same Id when use AttachDataView

I have an issue with the attachDataView method. I have a tabbar attached to a Layout. This tabbas has two different tabs. For everyone I use the attachDataView method for generate two different dataview. Every Dataview variable as a unique name.
Generally it works well, I obtain two different View and I parse two different data.

But sometimes, the data parsed in the second dataview are rendered in the first dataview (on first tab). Looking the code on Edge, it appears that the id of the two dataview are the same, while generally they are different. If I debug, I can see that first set of data are correctly parsed in the first dataview, but second is overriding first set. This because the two Dataset has the same id. While, when it works correctly, the id is different.

I tried many different approach to avoid this behavior, but still with no success. Any idea if this is a recognized bug and if so, how I can handle it? On the forum I found another users with same bug (but dataview was attached to layout), unluckily he tried a different approach before find a solution

Thank you in advance for your help

Could you please, provide a complete or a code snippet, where the issue could be checked locally.