There are always going to be mistakes when it comes to writing and publishing.
Your book is NEVER EVER going to be perfect... EVER. Not if your expensive, indie editor has combed through each and every dot, i and cross. Not if your entire writer's group have proofread word after word ad nauseam. Not even if you've been picked up by the top-recognized publishing house of the moment and your book has been passed through the entire company's editing staff.
Nope. It's not going to happen.
There will ALWAYS be a space where there shouldn't be one... a there instead of a their, a better word, a different font, a tighter layout -- you get the picture. It will never be perfect. There will always be something out of your control in the publishing process. In fact, you should expect mistakes.
Perfection is a crippling ideal that can kill a writer's dreams and stifle progress. We are constantly striving for the creme de la creme in all facets of our writing, which isn't necessarily a bad thing. But when you're consistently scrutinized, criticized (constructively or otherwise), rejected and picked apart it's hard to feel any sense of confidence.
Sometimes we obsess over a book's structure or content so much that it never has the chance to develop into a finished product. And forget grammar! There are so many components to worry about that fear can keep us circling around in an insecure black void.
As a naive young author I believed that if my book was published it was perfect. I was wrong. The more books I publish, the more I realize that mistakes are a normal part of getting books into print. Even after ordering countless numbers of proofs, publishing live and having in-person book launches I've found mistakes or room for improvement. Have I lost a few night's sleep over it? Of course! It sucks to realize that after carefully scrutinizing for weeks cover to cover I still missed something. I finally had to accept defeat and embrace the fact that the world will not end if my book isn't 100% flawless.
Should you do everything to the best of your ability to create a professional, finished product that readers can understand and enjoy? Absolutely! But don't get so caught up in the details that you lose sight of your goals. Every piece of writing can be improved in some way. At some point you just have to let go and move on to the next project. Set your sights and go for it! Writing is not about perfection and publication is far from it.
Don't be afraid to be human. It's okay to make mistakes... even in writing.