as far as i know, to resize panels you should set its scale_x and scale_y
for your purpose this should work
panel.scale_x = screen_size.x / panel.size_x;
panel.scale_y = screen_size.y / panel.size_y;
im not entirely sure if the size_x and size_y components change value after the panel is scaled, but if it is, then, if your panel is 64 by 64 pixels, just do it like this instead
panel.scale_x = screen_size.x / 64;
panel.scale_y = screen_size.y / 64;