Start by making the filling. In a large bowl, combine the ground beef, chopped onion, ketchup, mustard, salt, black pepper, and garlic powder or your favorite BBQ rub. Mix everything together using your hands until well combined.
Lay out a large piece of parchment paper. Remove one sheet of puff pastry from the package and keep the other in the fridge until you’re ready to use it. Puff pastry typically comes folded in thirds—use the natural fold lines as a guide and cut it into three strips. Take one strip out at a time and return the others to the fridge to stay chilled.
Using a rolling pin, roll each strip slightly longer and wider. The shape doesn’t have to be perfect.
Add a portion of the filling down the center of each rolled strip. Fold the dough over the filling lengthwise to form a log, then pinch the seam to seal. Flip it seam-side down and cut into bite-sized pieces. Place them on a parchment-lined baking sheet. Brush the tops with egg wash and sprinkle with sesame seeds if using.
Preheat your pellet grill (like a Traeger) to 375°F. Place the prepared bites on a parchment-lined tray or directly on a baking-safe cooling rack to allow airflow. Smoke for about 25 to 30 minutes or until golden brown and the beef is cooked through. Let cool slightly before serving.
Preheat your oven to 400°F. Arrange the assembled bites on a parchment-lined baking sheet. Bake for 20 to 25 minutes or until puffed up and golden brown. The internal temperature of the beef should reach at least 160°F. If the pastry isn't golden brown when the meat is done, raise the oven temp to 425°F and bake for an extra 3 minutes. Let rest a few minutes before serving.
To make the sauce, simply stir together ketchup, mayonnaise, sugar, black pepper, and pickle juice in a small bowl until smooth and well combined.