Welcome!
There are a couple of possible issues are play, one of which is not practically fixable today, and other with a "maybe" fix.
The first is the "W8" Curse." Massive numbers of iMac G5s were fitted with defective displays at one factory. Their serial numbers all begin with "W8," the factory code for a facility in Shanghai, China..
However, as this problem:
- consistency manifested itself as vertical lines, and
- would continue to show in Safe Boot mode
...I suspect you have something else.
The issue could be wonky video hardware, not uncommon in Macs of that vintage. That can manifest differently between normal boot and safe boot and in your case.
Your inclusion of
(worse under use.)
supports that because video hardware issues tend to get worse as the components get hot. So, what to do?
1) First, mitigate potential heat issues. Inspect all air intakes and exhaust vents on the computer and clean with a vacuum if dirty. ⚠️ Avoid canned air; it will drive any dust deeper into the computer.
Then make sure nothing on your work surface is blocking the air intakes on the bottom edge of the case, or the long exhaust slot across the upper back of the case. ANYTHING stacked under the case can affect cooling (I've successfully demonstrated this, but from sad experience!) Make sure nothing comes within six inches of the exhaust slot.
Test to see if that changed anything. That is the extent of your fix-at home options.
2) Second, a diagnostic that can be a workaround. A common diagnostic for video issues is to attach an external monitor and see if the video defects go away on the external.
- If the defects continue on the external monitor, the video hardware on the logic board is compromised in some way. As the video hardware appears integral on that model and not slotted, that likely means a new logic board.
- If the external has a normal image free of video defect, that indicates the video hardware is fine but there is a hardware problem with the display, the display cable, or the video inverter.
If the image is normal on the external monitor, leave it attached and call that a fix.
A variant on the above does not require an external monitor. When you see video defects, make a full-screen screenshot with SHIFT COMMAND 3. The screenshot should be on your desktop. Open the screenshot with Preview. It eh defect are in the screenshot, the video hardware is compromised. No practical fix.
If you have the computer's original optical disks you can run Apple Hardware Test. One thing AHT is good at detecting are fan problems, denoted with a code the starts "4MOT." Fans and disks are listed on powerbookmedic.com.