I posted this on Ask reddit also, so if you see it there thats why. But the title pretty much says it all.
Often. If they did it enough they would be shamed or executed.
Kamikaze spent much of their time reading and philosophizing to escape the idea of death. They sourced much of their ideologies from traditional Japanese inspirations, namely the idea of impermanence, death poetry, and reincarnation. Ironically, Western books were also quite popular, most notably Nietzsche and Sickness Unto Death. However, for some kamikaze this was nowhere near enough, as many joined the force for ignoble reasons. Namely, kamikaze were probably the best treated and best fed personnel in the military at that point, lavished with relative luxury. On their missions, they would be provided with delicacies to snack on before impacting an enemy ship. The rest of the military was taught to revere them as special and a cut above everyone else.
In light of this, some kamikaze strove to return to base and avoid death, as much as 9 times in one case. The military policy was loose enough that this was possible, namely if a pilot could not locate a target he was expected to come back. There is one recorded execution of the aforementioned pilot who returned a record 9 times.
This incident was in isolation because generally the weight of shame was enough to prevent pilots from changing their minds. There remained an intense stigma against kamikaze who failed to complete their missions well into the postwar era. Other factors contributing to the low incidence of execution were high mortality rates (for obvious reasons, as well as American fighters) even on missions where one did not intend to die, the tendency of kamikaze to fly together (so a sole survivor wouldn’t be believed) and the actually rather permissive military policy towards multiple-time returners.
Sources:
Ohnuki, Emiko. Kamikaze Diaries: Reflections of Japanese Student Soldiers.
For more information about kamikaze pilots, these earlier questions may be of interest:
Both have answers from /u/ParkSungJun.