You used style "position: absolute", the element is removed from the normal document flow, and no additional space is allocated for the element in the page layout. That is the "tab" block is by itself and does not interact with other blocks in any way.
Please, try using flex. Remove "position: absolute" and all the styles associated with it.
Then add the class
".ctr-accordion" additional style "flex: 1" and
".ctr-accordion.active" style "flex: 5".
Also remove the styles ".ctr-accordion.active .tab"