Honestly, I'm slowly convincing myself that a tank with a 155mm main gun makes sense, because if the current conflict in Ukraine is how a major mechanized war looks like in this age, then artillery is all. Something like this:
>electric drive with either multiple smaller generators distributed in the hull, or one big engine at the front, the point is to leave a big empty space at the back
>said big empty space is for a big magazine where the shells and charges stand vertically
>there is also a secondary magazine for rapid fire at the back of the turret, the shells and charges in this one lay horizontally (behind each other) facing towards the breech
>there is also a robotic arm or something similar in front of the main magazine, below the turret
>the breech of the gun can be depressed under the turret basket for some very high elevation, preferably up to 90 degrees, because why not make it also a SPAAG if we are doing this anyway
When the tank fights as a tank should on paper the secondary magazine is used, in this case the gun drops into a specific elevation so that the rammer of the secondary magazine has an easier job. If the secondary magazine is exhausted, then the robotic arm can pick up charges and shells from the main magazine, and with its own fancy bi-directional rammer shove them into the secondary magazine. And if a commander decides that even tanks should partake in artillery duels, then the roboarm can use its aforementioned rammer to load a shell followed by the desired amount of charges into the gun directly from the main magazine. Moreover, it should be able to load the gun at any angle, so that you can do that nice trick of having a bunch of shells impact at the same time.
Of course, the two main drawbacks seem to be the size and weight involved with a 155mm howitzer and shells, and the reduced performance compared to a smoothbore gun against armour. I'm no engineer, so all I can say about the first one is that the South Africans apparently managed to make a turret with the G5 howitzer that fits on a T-72, and the Germans put the Panzerhaubitze 2000's turret on the back of an M270, so maybe it is possible to overcome it if you throw enough engineers and money on the problem. As for the rifling, it seems to be somehow overblown, but again, I'm not particularly knowledgable about artillery and tank guns either.