Modern tube artillery systems have an advantage in terms of cost per (precision) strike and versatility of ammunition. Even with precision 155mm shells priced at anywhere from $25,000 to $110,000, they're usually cheaper than any equivalent rocket/missile system. Excalibur, SADARM/SMArt, Bonus and Vulcano have all been used with notable success against Russian armour in Ukraine.
Ukraine is also getting M1156 precision guidance kits, which turn a bog standard 155m round into a GPS guided round for less than $20,000 per shell.
Plus, some of the modern guided rounds have VERY long range. Bonus and SMArt have already hit targets in Ukraine out beyond 25km (probably longer). Raytheon claims 50km plus for Excalibur. Leonardo is claiming anywhere from 45-70km for the Vulcano family.
Experience in Ukraine shows tube artillery is not going anywhere.
BAE announced in October that it was looking at restarting M777 production, based on the success of the weapon in Ukraine and inquiries from a number of countries. Only problem is that it will take 2-3 years before the line can start putting out production pieces again.