How to make a group size flexible

hey bubblers, iam make my home dasboard to my project and i have a problem about make size of content group flexible to fit the blank space,
if u know what i mean,
this is the SS :

when the menu show it’s look ok but

when the menu sidebar is collapse it left a space on the right screen ( with red arrow),

my goal, i want to when a sidebar menu is hide the content is become wide so it doesnt leave a blank space,
(by the way i use drap/drop element to shift body content when sidebar menu is show/hide.)

am i should use a condition?
or other way?