I have been searching for the correct solution, and I found it I think.
When you place your recyclerview inside a ConstraintLayout thinking that way you can easily place your recyclerview correctly in relation to your other views (in your case your edittext), it will not work.
This used to be my layout xml, where it didnt work (I have reverseLayout=true on my LinearLayoutManager):
<androidx.constraintlayout.widget.ConstraintLayout>
<RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/editText"
app:layout_constraintTop_toBottomOf="parent" />
<EditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
With this layout, everytime I opened or closed the keyboard by pressing the EditText the scroll position would move slightly up.
I fixed it by not using ConstraintLayout, but replacing it for a good old RelativeLayout like so:
<RelativeLayout>
<RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_above="@id/editText"
android:layout_height="match_parent" <!-- This is important, with 0dp it still doesnt work -->
/>
<EditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
</RelativeLayout>
When setting the RecyclerView height to match_parent it will work. (The reason we use RelativeLayout is that on ConstraintLayout, you can't set the layouth_height to match_parent of child views, it will not function properly if you do that.)