Are custom detents resolved against the window or against UIScreen?

Our detents use fractions and absolute heights derived from the screen’s long side. After a fold, a detent that was “medium” on the outer display is far too short or too tall on the inner display until we rebuild the sheet. Do custom and system detents automatically track windowScene.screen.bounds, or must the app reassign sheet.detents when the scene geometry changes?

Are custom detents resolved against the window or against UIScreen?
 
 
Q