A man has been shot by police after two women were allegedly attacked in a unit building in one of Sydney's most exclusive postcodes.