I had the same experience with Layla, and I've talked about it a few times here on YT

We started going to the dog park last year when she was a year and a half old, and week after week she would cower and hide behind my legs. If another dog came up she would immediately lay down on the ground, sometimes rolling over until they left.
I spoke with a trainer this spring and she suggested puppy classes. The puppies are all small and playful and very outgoing, so it would hopefully get Layla out of her shell. I signed her up for puppy classes at two and a half years old

and the first day, she hit under a table, terrified. The second week she stayed by my side. She kept getting more and more brave until the last week she was actually running around with the puppies. I think it helped that they weren't constantly NEW dogs. It was the same group week after week and she learned how to greet dogs and play

I think she has been enjoying the dog park more this year. She is soooooo excited when she sees another dog, her little back end won't stop wagging!