I suspect it's like boxers and mma fighters that they are not bound to any rules or doping testing when they are "retired". They get juiced up wait a few months until they test clean and unretire.
Once they are an F1 team is when they start being bound to F1 rules.