Start small
Calm greetings are easier when your dog has permission to stay at a distance.
There is no need to rush. A predictable, manageable step is usually more useful than trying to solve the whole situation in one day.
Try this next
Ask a visitor to ignore the dog at first and reward four paws on the floor from a comfortable space.
Notice what helps your dog stay comfortable and engaged, then repeat that version before making the situation harder.
Keep it kind and practical
Keep the next step easy enough that your dog can succeed. If you are worried about safety or feel stuck, pause and ask a qualified reward-based professional for help.