Add gin, lemon juice, and maple syrup to a shaker without ice. Give it a good stir with a bar spoon, add the egg white, and dry shake vigorously for at least 1 minute. Add ice to the shaker and shake for another 30 seconds. Strain into a chilled rocks glass. Carefully pour root beer into the drink. Give it a gentle stir and garnish with a star anise pod.