Building the answer @sahil-jaidka provided in the comments, you can fix this with KeyboardAvoidingView and setting isKeyboardInternallyHandled={false}
on your GiftedChat component.
import {
KeyboardAvoidingView,
Platform,
StatusBar,
View
} from 'react-native';
import { useHeaderHeight } from '@react-navigation/elements';
import { GiftedChat } from 'react-native-gifted-chat';
export default function ChatScreen() {
const headerHeight = useHeaderHeight();
const keyboardVerticalOffset= Platform.OS === 'ios' ? headerHeight : headerHeight + StatusBar.currentHeight;
return (
<View style={styles.container}>
<GiftedChat
messagesContainerStyle={styles.messagesContainerStyle}
messages={messages}
...
isKeyboardInternallyHandled={false}
/>
<KeyboardAvoidingView
behavior='padding'
keyboardVerticalOffset={keyboardVerticalOffset}
/>
</View>
);
}