That is part of the art and difficulty of macro photography. As with all lenses, only one plane is in perfect focus and everything closer and further will be blurry.
The only thing to do to maximize depth-of-field in one shot is to pick a small aperture. It is recommended to use something up to the diffraction limit of your camera which should be about F/16, otherwise the whole frame becomes blurry.
Once you have a certain depth-of-field, you should take advantage of it by placing the focus somewhere in the middle (as measured in sensor-distance) of what you want to appear sharp. The common rule of thumb is that depth-of-field is 1/3 in front and 2/3 in back of the place of focus.
The other option you have it to take multiple shots and merge them together using a technique called Focus Stacking. Each shot should be taken at the same aperture but with a different point in focus. There are specialized software to do that (just search for the term) but Exposure Fusion software also do it (because of how they work).