Max width/height and automatically use screen with active window

I want to strech a window to max height or max width and keep either max width or max height.
I have a dual screen setup here

So I setup a custom move/resize and set that it for eg height. move active window, set y origin to 0% realtive screen height and change window height to relative to screen 100%

But there is no way to say to use the screen where the current active window is, I only can choose a fixed screen or choose under cursor, but there is no screen with active window.
There must be something like this because the pre-defined window snapping features work perfectly on both screens.

Am I missing some setting?

I think I found the solution to this:

Use this monitor when setting th enew position for a window:
0 screens -> right -> from window display

I honestly do not undertand those settings and sadly there is zero documentation.

But when the window is active, wherever my mouse cursor is (prim/sec monitor) it resizes the window on the current placed monitor.