Setting a ui.Window's minimum width

Hi, how do I set the minimum width on a ui.Window? I don’t want to use auto_resize because I want to be able to make the window wider. But I do need to have a width cap so I don’t lose visibility of my widgets when making the window too narrow.

I tried:

self._window = ui.Window("My Window", width=1060, height=410, width_changed_fn=self.OnWindowResized)

def OnWindowResized(self, *args):
    if self._window.width < 1020:
        self._window.width = 1020

but that doesn’t actually prevent me from resizing the window below 1020 even if self._window.width = 1020 when checking after the resize.

This works in a way:

def OnWindowResized(self, *args):
    if self._window.width < 1020:
        self._window.auto_resize = True

but that just turns off the ability to resize the window once window width goes below 1020 so not really a solution :D