>>976958frame size refers only to the seat tube. In your case the seat tubes have the same lengths which means, yes, they have the "same size" and if one fits you the other will probably also.
But there are lots of other aspects of bike geometry, see pic related. A road bike has a completely different geometry from a touring bike or a mountain bike.
A measurement which can be of some importance is the top tube. I have long legs but a short torso, so I prefer short top tubes.
Go ride some bikes and have a look at the geometry to get a feeling for the differences.