I'm sure the main routes were likely kept on the same gauge, however I'm merely repeating what I heard in Pandora's Box, by Jorn Leonhard and Patrick Camiller, which implies that both halves in many cases had differing gauges or disconnected tracks.
It is also noted in Fall of the Double Eagle: The Battle for Galicia and the Demise of Austria-Hungary by John R. Schindler, who notes that the AH Rail system was vastly overstretched and not uniform, with Austrian state railways provider owning some 82% of Austrian tracks, while the Hungarians had their own state company with restrictions upon Austrian use. The International Railway History Association also notes that notes that one of Austria's main issues was that there was little to no rail connectivity between Hungary and Galicia in particular, save for three regular single-track lines from Budapest direction.
Going from memory here...
Disconnected in the sense that there were a couple dozen competing companies - who as in the example of Vienna, built at least 6 terminal stations that weren't connected - though most of them had been consolidated down to the two state railway companies by the war. And with that most of those infrastructure gaps around cities had been filled in too.
Track gauge was near universally standard gauge (1,435 mm).
Hungary used it from the start.
Hungarian Wikiedia/AI translated since I can't read that one said:
In Hungary, too, the first railway line between Pest and Vác was built with a standard gauge, and subsequent railway constructions also used this gauge. The tram and metro lines in Hungary, as well as the Budavar cable car, were built with standard gauge. Apart from the 1435 mm gauge, the economic light railways in the country have a narrow gauge, and in the vicinity of Záhony, due to the proximity of Ukraine, railway lines with wide or braided gauge were built.
In Austria the first (horse drawn) railway was built to 1106 mm gauge, but even the first 'proper' railway, the Nordbahn, was already built to standard gauge - and so were as far as I know all 'big' lines that followed. Certainly everything 'main line' built (or upgraded) after 1884 (IIRC) due to international treaties.
As mentioned before: the exception was (partially) Bosnia - where narrow gauge mountain railways were built (and there the internally to be standardised by the late 1870s 760 mm 'half standard' 'Bosnian' gauge) - though at least some of them were built to be easily converted to standard gauge.
Similarly several 'local railways' - for example Zillertalbahn, Mariazellerbahn, Bregenzerwälderbahn. But those are just that - side spurs connecting mostly mountain valleys to the main track. Not significant transport arteries. And those and similar lines make up most of the 18% missing - the rest are mostly what would these days likely be termed 'light rail' - see for example the Badnerbahn - who does in fact use standard gauge.
Going further on the quote.
Overstretched? Yep, that it certainly was. Not uniform - can't really deny that, on an administrative level - but not necessarily on a infrastructure level.
Hungarian state railway restricting a competitor from using their rail infrastructure? Sure, absolutely happened. Two different transport Ministries involved too. Though without looking into things, I'd assume those were soon overrules for 'necessity for the war effort'.
And that also (partially) explains why there were so no high capacity connections from Budapest to Galicia - the Hungarian part of the Empire, their state railway company, and their transport Ministry didn't give those lines to Cisleithania priority. Though IIRC the Első Magyar-Gácsországi Vasút (EMGV) was double tracked. (I hope that was the right one, 2 minutes with Google might have given me the wrong line). (And IIRC correct that one ran through Premysl too, leaving the trans-Carparthian areas further south more than once cut off from that transport route, leaving probably two or three lines running there - explaining what you quoted? I've forgotten to much about the area and the time.)
Prior to the war, the main railway route to Galicia was the one running through Krakow, entirely within Cisleithania, but reality on the ground did mean that several parts of those lines fell under Russian control more than once.
And even aside from political considerations when planing rail lines, there was geography: The Carpathians were (and still are) a formidable obstacle for rail.