If you sometimes get frustrated that your hands don't quite work together when you're playing piano, you're not alone. Developing hand independence is one of the most difficult aspects of learning piano. Everyone has to go through the process of learning to play different things with each hand and yes, it can get frustrating at times!
Bot don't let it get you down. Learning to play one thing in your left hand while your right hand plays something else will take time, and you can't rush the process. It takes time, like a big pot of soup simmering on the stove. Sure, turning up the heat may make the soup cook faster, but the flavors will blend better with slow, steady heat and more time. Lots of time and no hurry. That's what makes great soup.
The basic idea is to kind of split your brain in two. But it's not quite half and half. Since most of the time the left hand is playing a type of accompaniment to the right, at first you'll want to direct most of your attention to what your left hand is doing. 90% LH and 10% RH.
So if, for instance, you're learning to improvise over a repeating bass pattern, focus on this almost exclusively. Don't worry about whether your RH sounds good or not. Just keep that LH pattern going and improvise something very simple with your RH. (This is where most players go wrong, btw. They try to play too much with their right hand at this point and get frustrated when their LH messes up.)
If you remember that the first step is to get your LH more solid playing the pattern (or chords, or whatever), then it's incidental what happens in the RH solo. Not important at all, since it's an accomplishment to play anything at all while your LH keeps going.
Then, once you become very comfortable and consistent with the left hand technique, gradually shift more and more of your attention to what the right hand is playing. And if your LH stumbles a bit, go back to focusing on that for a while. Over time you'll become freer to express yourself through your RH improvisation while playing your LH accompaniment with confidence and ease.
Have fun with your practicing and keep your longtime goal in mind. With enough persistence, you will learn to play the way you want to!
If you're into jazz piano, here something I wrote about how the left hand defines the jazz piano style. Good luck with your playing!