I'm not sure the 24 months thing is accurate. ADHD & ADD require 12 months off of meds, but there is no time length specified for anxiety disorders. Source: AR 40-501, released in Dec 2016.
I see in AR 40-501 where it states "k. Current or history of anxiety disorders (anxiety (300.01) or panic (300.2)), agoraphobia (300.21), social phobia (300.23), simple phobias (300.29), obsessive-compulsive (300.3), other acute reactions to stress (308), and post- traumatic stress disorder (309.81) do not meet the standard."
When I look at DoD Directive (DoDD) 6130.3 it says
p. History of anxiety disorders (300.01), anxiety disorder not otherwise specified (300.00), panic disorder (300.2), agoraphobia (300.21, 300.22), social phobia (300.23), simple phobias (300.29), other acute reactions to stress (308) UNLESS:
(1) The applicant did not require any treatment in an inpatient or residential facility.
(2) Outpatient care was not required for longer than 12 months (cumulative) by a physician or other mental health professional (to include V65.40).
(3) The applicant has not required treatment (including medication) for the past 24 continuous months.
(4) The applicant has been stable without loss of time from normal pursuits for repeated periods even if of brief duration; and without symptoms or behavior of a repeated nature that impaired social, school, or work efficiency for the past 24 continuous months.
As you can see AR 40-501 does not have the exceptions. That is where I got the 24 months. Or at least the caution when thinking about a waiver. Which document should be used? And Why?