In the bowl of a stand mixer, combine the water, sugar, salt, and butter.
Add 4 cups of flour, mix until combined, and let sit for 15 minutes.
Add the yeast and start kneading the dough with the dough hook attachment. If it is still sticky add the remaining flour until it starts to pull away from the sides of the bowl.
Knead for 8-12 minutes.
Cover and let rise in a lightly greased bowl in a warm place for 1 hour until doubled in size.
Once risen, divide the dough into 12 equal pieces using a bench scraper and shape into balls on a floured work surface. You want to create some surface tension when shaping them.
Cover and let rise again for about 30 minutes.
Preheat the oven to 425 degrees F.
Fill up a large pot with water about ¾ of the way full and bring to a boil.
Slowly add the baking soda into the boiling water.
Carefully place 3-4 pretzel buns into the boiling water. Allow to cook for 30 seconds each side.
Remove from the pot and place on a baking rack to allow the water to drain off.
Place on a parchment-lined baking sheet.
Whisk the egg and brush over the tops of the buns, then use a sharp knife or razor blade to cut an X in the top of each bun.
Top with a pinch of flaky sea salt.
Bake for 15-20 minutes until the tops are golden brown and the buns are fully cooked through.