Same here.
Both of the above workarounds fix the problem of the keyboard appearing over the sheet, but there is still another problem that causes a layout change that seems to temporarily cancel the search bar when the sheet is displayed.
This is not much of an issue when the sheet is displayed in full screen, but it is quite annoying when the sheet is displayed in PresentationDetent.medium, etc.
I have not found a workaround for this problem yet.