The cars had been getting steadily heavier and larger over the decades, but at a much slower pace than they have since the PU change. The added weight isn't just coming from the hybrid components. The extra weight of the hybrid power unit and batteries causes everything else to be built heavier, especially all of the safety structures that are built to handle more mass. The cars were huge before ground effect kicked in in 2022, and when they brought back ground effect, the length of the cars actually went down. Even the 2021 cars were 110kg heavier than the 2013 cars.
They weren't getting bigger from 2014 to 2021 because of adding nose length for the safety for the drivers. That's stayed pretty much the same since then. A lot of the new length of F1 cars has been added behind the driver and by allowing the front wing to extend well in front of the tip of the nose rather than being a few inches behind it. Almost all of the Increase in the distance from the driver to the nose had already taken place before 2014, but it wasn't done solely to protect the driver. It's not just a safety mandate. It's also a design choice. Designers & teams always want and push for the longest car they can, to most efficiently and predictably control the air to produce downforce. The longer the body being moved through the air, the more stable you can make air flow around it. The heavier the car, the more they push for a bigger floor, ground effect or not. Yes, a larger floor generates more lift/downforce, but this is also true for flat floor cars.
The enhanced safety structures of late do tend to directly increase the weight of the car, but not the length or width. They did beef up side impact structures after 2014 (can't rmember which year), which did add some weight. 50 kg is a lot on an F1 car, and if you want it to perform in the corners, you have to make more downforce to do it. The weight limit started going up much faster when they introduced this PU formula, and didn't stop with the addition of weight in 2014.
The good thing here is that, at least for next year, they'll be 20cm shorter and 10cm narrower. It's not much, but it's a start.
tl;dr: What were we talking about again? Oh yeah, it's not just the one thing. It's the dismal tide.