Tough luck if you publish and then see your patent denied.
Usually that means you are even commercial footing with the rest of world. It's not "tough luck," it's "go compete!"