Do all patent applications for formula have to be made public?

If others can't test it, it is recommended to use your own secret method. For example, Coca-Cola did just that.

If others can test it, there is no point in keeping it secret. Suggest applying for a patent.

Patent protection is often inadequate, but it is better than what you think is confidential and others can test the results.

If you apply for a patent, others can find the formula online.

Patent applications require full disclosure, but not all, which is very subtle. So I suggest that if you decide to apply for a patent, please hire a better patent agent.