If you are cautious of consuming raw egg, use pasteurized egg white in its place.
For a vegan substitute to the egg whites, try aquafaba.
Depending on your cocktail shaker, the dry shake method can produce pressure inside the shaker which can possibly push the top off. To avoid this, be sure to grasp the shaker firmly with both hands and ensure that the lid is in place well. Then shake straight up and down rather than at a slant for the dry shake.