When you are alone you feel safe, or your brain thinks so, and in social relations you perceive threats upon yourself in a subconscious way. Your job is to be able to feel safe in the perceived "dangerous" situations. New situations, new circumstances, new people and so on create a ground of caution, in which expansion is blocked. Take your time to understand this during situations such as these and also, you can force a little bit to expand yourself, but this does not mean fake it, but pressing upon the matter in your mind, and as, so you can regulate consciously your behaviour.
Secondly, to have confidence, you have to do things that make you confident, and this means yourself being proud of actions and things that you do consciously. This means living your life, experiencing it, growing. Upon this, life builds itself and this won't be any matter of sensing or theory but natural embodiment. If you know internally you have nothing to be proud of in a penetrative or stationary "bull" way, of course the body follows the nature of hiding, evading and invisibility as to conserve itself.