Thanks for responding.
After more investigation, it turns out that hl-line-mode is not responsible for this - I was having this issue in emacs -Q whenever emacs redrew text (which just happened much more frequently in hl-line-mode). Sometimes it would disappear, and sometimes it would duplicate the last line when scrolling down. I tried using Gnome on Wayland instead of X and did not experience this issue. But other things did not work in wayland.
Since the Arch Wiki (
https://wiki.archlinux.org/index.php/intel_graphics) suggests that the kernel modesetting may be better than the intel graphics package, I uninstalled that package just to see if that would fix the issue. After uninstalling and rebooting the computer, I have not experienced this weird disappearing/duplicating text issue.
I don't know enough about this to tell whether this is a bug in that intel graphics package or emacs.
Thanks again!