I'll ask again:
Are worker ants and soldier ants at an evolutionary disadvantage compared to the queen ants?
The Queen ant still gets to breed. Individually, its disadvantage for the worker and solider ants, but as a unit they've evolved like that and are efficient. Also I don't think you can compare humans to ants.
How is it an evolutionary disadvantage for the worker and soldier ants, since they contribute to their own genes spreading?
For example, imagine A and B breed together and the siblings C and D are born.
C is sterile, and D is not sterile.
D breeds with some unrelated specimen E, spawning F.
C shares half his genetic code with its sibling D.
D shares half his genetic code with its offspring F.
On all pragmatic accounts, D is as valuable to C as F is to D.
Even if C cannot breed, it can help its own genes spread and prosper by helping D survive.
Just like D helps its own genes prosper by reproducing with E and helping F survive.
Now, let's substitute letters with some "real life examples"...
A = Queen ant
B = Male ant
C = Worker/soldier ant
D = Queen ant
E = Male ant
F = Any other ant
And...
A = Mom
B = Dad
C = Homosexual son/daughter
D = Heterosexual son/daughter
E = Mate of heterosexual son/daughter
F = C's nephew/niece
Of whatever species, including, why not, humans.
By working to make the nest prosper, the worker/soldier ants can grant their sibling queens a chance to survive and colonize new area, thus helping spread their own genetic code.
By helping their relatives, the homosexual person can grant their siblings a better chance to survive and reproduce, thus spreading their own genetic code.
Or... is there some special metaphysical quality into the genetic code of a specimen that comes from your direct breeding, as opposed to specimen that share your genetic code but are a result of somebody else's breeding?