I have a yard set up with static locomotives, a lot of them too, and don't have that issue.
Try turning off the headlights. Headlights are different than other light sources in Trainz.
Remember Trainz pushes hardware and you may want to address power-consumption as Graeme points out your video card is typically underpowered by whoever made your PC. I said typical because most system builders always put in minimum spec power supplies. These work fine for everyday use but not always enough to allow for hard use or wiggle room in case you want to add in another hard disk or more memory.
I have some $1,700 in combined upgrade hardware and software in transit right now. The PC upgrade will also be getting Windows 11 Home OEM to boot. That will really give something for Trainz to try to take the bull by the horns. I dare Trainz to beat up $1,700 worth of my PC add-ons!
1 of: ZOTAC Gaming GeForce RTX 4070 Super Twin Edge OC DLSS 3 12GB GDDR6X 192-bit 21 Gbps PCIE 4.0 Compact Gaming Graphics Card, Ice Storm 2.0 Advanced Cooling, Spectra RGB Lighting, ZT-D40720H-10MSold by: Amazon.com Services, Inc Supplied by: Other Condition: New $609.97
1 of: Crucial Pro DDR5 RAM 32GB Kit (2x16GB) CL36 6000MHz, Overclocking Desktop Gaming Memory, Intel XMP 3.0 & AMD Expo Compatible – Black CP2K16G60C36U5BSold by: Amazon.com Services, Inc Supplied by: Other Condition: New $99.99
1 of: Corsair Dual SSD Mounting Bracket (3.5” Internal Drive Bay to 2.5", Easy Installation) Black Sold by: Amazon.com Services, Inc Supplied by: Other Condition: New $4.99
1 of: Noctua NH-L9a-AM5 chromax. Black, Premium Low-Profile CPU Cooler for AMD AM5 (Black)Sold by: Noctua Cooling Solutions (seller profile) | Product question? Ask Seller Supplied by: Other Condition: New $54.95
1 of: MSI PRO B650M-P ProSeries Motherboard (AMD Ryzen 9000/8000/7000 Series Processors, AM5, DDR5, PCIe 4.0, M.2,SATA 6Gb/s, USB 3.2 Gen 2, HDMI/DP, 2.5Gbps LAN, mATX)Sold by: Amazon.com Services, Inc Supplied by: Other Condition: New $119.99
1 of: Samsung 870 EVO SATA III SSD 1TB 2.5” Internal Solid State Drive, Upgrade PC or Laptop Memory and Storage for ITPros, Creators, Everyday Users, MZ-77E1T0B/AMSold by: Amazon.com Services, Inc Supplied by: Other Condition: New $92.19
1 of: AMD Ryzen™ 9 7900X3D 12-Core, 24-Thread Desktop Processor Sold by: Amazon.com Services, Inc Supplied by: North To South (Serial Number Recorded) (seller profile)Condition: New $456.99
1 of: Microsoft Windows 11 (USB)
Sold by: GalaxyDealers (seller profile)
Supplied by: Other
Condition: New
$134.88