I found an easy way to fix this from any ROM, without having to wipe userdata.
tl;dr:
Edit: Make backups. It shouldn't be necessary, but you never know!
Flash the 2020-08-25 stock ROM, but skip flashing/wiping userdata. More info here.
Let it attempt to boot (for a couple of minutes). It (very probably) won't ever get through it, because the userdata partition wasn't wiped. This doesn't matter, though. It does flash the touchscreen firmware, which fixes the unresponsive screen edges.
Edit: I did not time it, but I think I let it sit at the boot logo for 2-3