Capacity = (difference between max and min chainring) + (difference between max and min cassette ring).
So – 10-42 on a 1x system is (0) + (42-10) = 32.
On your 2x it’s (50-34) + (42-10) = 48.
System capacity amounts are often conservative, but that’s not going to go. SRAM 2x systems tend to end up with 11-36 out back at most.
Similarly, the GRX 2x setups ship with 11-34 out back, even if they have 46-30 up front. Some people have pushed the range of Shimano setups before but to answer your question, yes, there very much is a limit, and if the factory recommended limit is 36 teeth, 48 is way, way over. Either scale back the rear cassette, or go to a larger one with the 1x setup.
(There’s also the issue of max sprocket size on a rear mech, separate to capacity. SRAM Road and MTB are more cross compatible than Shimano were, so you might find that if a larger mech is needed, that’s not such a problem.)