You actually don't need a workaround.
The preview is showing when you open the androidMain/MainActivity.kt file.
Just dock this file to the right side and you can simply drag the preview panel over the whole code.
You don't really need to be able to see the MainActivity.kt code.
That way the preview panel that is linked to MainActivity.kt is just showing to the right side of your screen, while you can just create/edit your layout in the CommonMain/YourAppName.kt file