Flatlist scroll to top onChange text in React native

There is an issue in my flatlist when typing anything in the text-input field it scrolls to the top position it should stay at the current position. my code is

         ```<FlatList
              onScroll={(e)=>{
                this.setState({scrollPosition:e.nativeEvent.contentOffset.y})
              }}
              ref={this.flatListRef}
              style={listStyles.GrayListContainer}
                data={postsList.data}
                keyExtractor={postsList.data._id}
                ListFooterComponent={
                  postsList.data.length > 0 ? (
                    <Loaders data={postsList} />
                  ) : (
                    ""
                  )
                }
                onEndReached={() => {
                  postsList?.next_page_url !== null && this.fetchMoreData();
                }}
                onEndReachedThreshold={4}
                keyboardShouldPersistTaps="handled"
                listKey={(item2, index) => "M" + index.toString()}
                removeClippedSubviews={true}
                onContentSizeChange={()=>{
                    this.flatListRef.current.scrollToOffset({offset: this.state.scrollPosition, animated: false  })
                }} />```