Do you have to reapply for a building permit if the planning permission has been revoked by a court?

All of us know how much work it takes to obtain a valid building permit. But what happens if a court cancels the planning permission that was the basis for the desired building permit? Will the building permit be automatically revoked as well? And what if you have already built the structure - will it be classified as an illegal structure that must be removed? Can the building permit subsequently be reviewed by a court on the basis of a lawsuit by a dissatisfied participant in the proceedings? The answers are provided by the judgment of the enlarged senate of the Supreme Administrative Court of June 20, 2024, ref. no. 1 As 277/2022-54.