This is indeed an upstream issue with kernel 5.4.x, reported at:
- https://bugzilla.kernel.org/show_bug.cgi?id=205793
- https://bugzilla.kernel.org/show_bug.cgi?id=205745
There aren't any proposed solutions / patches at the moment for it however. If I get the time tomorrow I'll look into the git history for the elantech input driver changes and see if I can find where the issue may lie.