Can a plaintiffs attorney or prosecutor ever bring up a defendants sexual orientation in any manner?

In a deposition can a plaintiffs attorney questions a defendant about sexual orientation, or get evidence of past prior sexual acts with the same sex for any circumstance or reason to be used as evidence against them. Same applies to a criminal case thanks and this question applies sexual assault evidence

ok thanks now how bout some of these scenarios in alleged sexual assault cases a. plaintiffs attorney states that homosexuality as motive (a man rapes a woman to cover up sexuality to peers).

or conversely a woman protected under rape shield law filing a claim of sexual assault with past acts extremely similiar

]