Sorting nodes by title aren't returned in correct order.
Compare changes
This PR includes latest changes from https://www.drupal.org/project/drupal/issues/3186834#comment-15425338 onwards
Additionally, fixed following things:
Closes #3186834