@Jim-G
I don't know where you are really at now, because I do not get the same results as you do. FWIW I am using Ubuntu 26.04, Qt 6.10.2, PySide 6.11.1. But I am not expecting any difference for you from different versions or platform (e.g. Windows if that is what you are using).
If I copy and paste your original code I get a visual window. It is a main window. It opens "small", but I can drag-resize it and it looks similar to what you showed in both screenshots. But note this whole code is quite wrong: you end up with two QMainWindows, one is your MainWindow and the other is a QMainWindow from your .ui file which has been set as the central widget via self.setCentralWidget(self.ui). You do not want a QMainWindow as the type of the central widget of a QMainWindow!
If I replace just MainWindow's def __init(self) per your last post I get an empty MainWindow --- your title but no content. And the same whether loader.load(ui_file, self) has self as parameter or not. No "hang", no "no window displayed".
So if you really want to use, or have people investigate, you attempted use of QUiLoader(), I suggest you paste a new complete but minimal example of your code as it is, as I am guessing it is not just as you show/I have copied.
(I still don't think the new code can be right: self is your MainWindow, which is a QMainWindow, and when your __init() goes self.setLayout(layout) that sets the whole layout of a QMainWindow which you would never want to do. The point of a QMainWindow is that it already has its own layout with various widgets to produce menus and status bars. It has one area in the "middle" which is the "central widget" and you should only be setting that and its layout and content.)
Personally I do not think you will gain much by persisting with QUiLoader()/loader.load(ui_file) since I don't think that is the best way to use Qt/Designer back-end code. As I have said I would abandon that approach and use the class-generation one instead. I have never used QUiLoader() so don't have much experience, but will look again at your code (if made to work) if you wish to continue with that.