Modify `FlyoutHeaderAdaptsToMinimumHeight` test to work better on CI (#19685)

Co-authored-by: Mike Corsaro <mikecorsaro@microsoft.com>