Preheat your oven to 350°F (175°C).
In a large pot, combine the drained navy beans, root beer, ketchup, brown sugar, chopped onion, Dijon mustard, Worcestershire sauce, garlic powder, black pepper, and salt. Stir well to combine all the ingredients.
If you are adding bacon bits, mix them in now.
Pour the bean mixture into a 3-quart baking dish, making sure it is evenly spread.
Cover the baking dish with aluminum foil (optional) to prevent excessive browning.
Bake in the preheated oven for 1 hour, then remove the foil and bake for an additional 30 minutes, or until the beans are bubbly and the sauce has thickened.
Remove from the oven and let cool for a few minutes before serving.