Just learned this modifier from swiftUI:
safeAreaInset(edge: .bottom, spacing: 0) {
bottomSearchBar
.padding(.bottom, isSearchFocused ? 20 : 0)
.padding(.horizontal, isSearchFocused ? 16 : 24)
.offset(y: 12)
}
From this SO question, give it a try!
How do I remove the square white background behind the rounded corners of the keyboard in Xcode 26?