Change order tabs after drag and drop

Hello,

I need help after dragging tabs and replacing one with another, the tab does not open correctly. When I create tabs they go from 0 to 2 and open correctly.

After the replacement, I click on tab 1, for example, 2 opens and vice versa, and 0 opens as expected.

I can’t figure out what the problem could be.

Sorry for my English)

There is no such built-in feature - try to debug your custom code responsible for this functionality.