Can one perform Bernoulli trial by restarting trial if everyone is assigned control or treatment? Suppose I have $n$ patient. I want to give an assignment of treatment such that probability of patients receiving treatment is $0.5$. Say I have $n$ unbiased coins to determine treatment or control status with $H=treatment$. In causal inference, I would like to compare treated outcome and untreated outcome. Suppose I toss $n$ unbiased coins with all heads. This is very bad as we do not obtain any information for control case.
Suppose I have tried 10 times and find out all heads. Hence, I cannot infer causality from previous 10 assignments. Thus those assignments have to be discarded. At the 11th time, I obtained some heads and tails.
Should I discard the design or should I keep 11th assignment generated? Of course, I could run the same argument for biased coin to favor patients receiving treatments.

I think you could keep the 11th draw. I am not sure about how to prove it theoretically, but a small simulation example should be enough (I am using R):
set.seed(1986)

b = 100000 # Number of iterations.
suc1 = numeric(b) # Pre-allocating memory.

for (i in seq_len(b))
{
  assignment = rbinom(100, 1, 0.5) # Bernoulli experiment.
  suc1[i] = assignment[1] # Store treatment status of first unit.
}  

sum(suc1) / b # Probability that the first unit is treated across b Bernoulli experiments.

This shows that by repeating the coin toss, we still are ensuring that each unit hat 50% chance of being treated (you can check by running the code for a different unit). So, I feel that you could keep the 11th assignment, and perform your analysis.
That being said, I really suggest to rely on a completely randomize trial, where you fix ex-ante the number of units to be treated $n_t$, and choose them simultaneously. Choosing $n_t = n/2$ ensures that the probability of being treated is 0.5. In this way, you lose the independence property of the Bernoulli trial, but you can control for the number of treated units, thus avoiding extreme cases where you have zero or too few units in a given treatment arm.
