I’d recommend checking your computer’s resource usage while sculpting. It might be a hardware limitation—most likely your RAM. If that’s the case, I suggest working with a 2K landscape, which is more than enough in many situations.
Also, if your foliage is driven by your landscape material, you can temporarily disconnect the foliage part in your master material while you work, and reconnect it afterward.
If you still want to see how your foliage behaves while sculpting, consider replacing it with a low-poly proxy mesh, and switching it back to the original mesh once you’re done editing.
Lastly, if you’re still experiencing performance issues, you can disable the landscape’s collision while editing, then enable it again afterward.
That should help!