My plane seems to be flying parallel/at an angle to the waypoint in Autopilot

Yup LNAV all the way. Too late to try now since I landed already but are you suggesting toggle LNAV off then on?

Also this happens with A320neo as well but not as bad as 747.

FYI the 747 was an overnight flight from Dubai (OMAA) to Chicago (ORD). Different climates, barometric pressure, etc. Not sure if that has impact.