In the end, it really depends on your typical workflow, which you haven't described. Let me elaborate on why this can make a large difference.
Both processors have the same number of cores, threads and boost speeds. The difference lies in the base speed, i.e. the speed that is guaranteed when all cores are active for longer periods of time. Expect thermal throttling more often on the laptop due to a more compact cooling solution and lower thermal dissipation. The laptop will seldom let you reach boost speed on all cores for longer than a few minutes at a time.
If you often use multithreaded software (video encoding, some Photoshop plugins that can max out all cores) or do batch processing with raw files in parallel, you will notice a substantial difference between the two processors.
If you do normal work in Lightroom or Photoshop, you will be much less impacted by the difference since it is unlikely that all cores will be taxed for longer periods of time. This will provide time to dissipate heat between bursts of activity and you might never experience thermal throttling.
And the laptop is much easier to carry around, should the need arise!
Cheers,
Fabien