Yes you can swap a G43 and G48 slide onto either a G43 or G48/43X frame without any issues.
When we talk about compact and full size frames things will change a bit. And what generation will matter too. You can use a Gen 3 slide on the corresponding Gen 4/5 slide with changing the slide back plate and also using an adaptor to fill in the space between the slide and frame. So a Gen 3 G19, G23, and G32 slide will work on any generation of compact frame.
Things get tricky with the full size frames (G17). The Gen 5 G17/22/31 barrels use the same size barre locking lugs as all G19/23/32 barrels. So you can run a Gen 5 G17/22/31 slide on a Gen 4 G19/23/32 frame.
Gen 1-4 G17/22/31 barrels have bigger/longer locking lugs and those will not work in the Gen 5 G17/22/31 frames. You can however run a Gen 1-4 G17/22/31 slide on any G19/23/32 frame as long as you use a Gen 5 G17/22/31 barrel with the corresponding slide.
NOTE: The 40 S&W and 357 Sig barrels will NOT fit into a 9mm slide, the barrels barrel hoods are bigger. And do NOT use a 9mm slide in a 40/357 slide since the barrel and hood are too small.