I already detected this same issue of disconnection for Query Layers in ArcGIS Pro 2.4... seems nothing changed...
For the particular case I had, I worked around the issue by dumping the layer to a Pro layer file (*.lyrx) by saving it out, and editing the JSON directly using the Python 'json' module and "json.load" / "json.dump" methods.
Note that this is wholly outside the realm of safe edits that ESRI probably supports, but if you are careful, and understand the CIM and know how to mentally translate it to the respective JSON structure, you can in fact edit the json directly by modifying the hierarchical dictionary structure that "json.load" will give you access to, and then dumping it back to the layer file, and subsequently re-load the layer file in ArcGIS.
Note that the *.lyrx layer files are in fact stored in text format, not binary, so you can luckily inspect them and the CIM structure in a text editor, which helps getting it right.
I know..., it makes you grind your teeth... knowing you should be able to do this no problem using "layer.getDefinition/setDefinition"...