I haven’t done research on Lexapro specifically but other SSRIs (sertraline/zoloft) are safer in the first and second trimester and are recommended to be tapered off of in the last trimester due to possible pulmonary vein stenosis in the infant.
That being said, there’s a growing amount of research that suggests extra stress during pregnancy results in important epigenetic changes and alterations in offspring’s behavior compared to non-stressed mothers’ offspring. It is definitely important to find a medication that will help you.
It’s a horrible balance to try and maintain, but I think if you talk with your OB and psychiatrist they will do their best to get it sorted. I know in my area there is a specialist psychiatrist that specifically works with pregnant women to help them stay safely medicated during pregnancy and in the post-natal period if they want to breastfeed. I imagine if SSRIs are your best option that you could go for more ultrasounds as the third trimester progresses to check if pulmonary vein stenosis is a concern and taper off if there is evidence of narrowing.