Tie tenderloin with kitchen twine in 1-inch increments to form an even piece, so it will hold its shape during cooking. (Your butcher can do this for you.)
Heat a large cast-iron or heavy skillet over medium-high heat. Season beef with 1 teaspoon salt and 1/4 teaspoon pepper. Sear tenderloin until well browned on all surfaces, about 1 1/2 minutes on each side, including ends.
Transfer tenderloin to a cutting board with a drainage well; let rest until cool. Cut and remove the kitchen twine, and chill tenderloin until ready to assemble and beef is cold, at least 1 hour or overnight.
In another large skillet, heat butter over medium heat. Add onion; cook until it softens, about 4 minutes. Add mushrooms; season with remaining teaspoon salt and 1/4 teaspoon pepper. Cook, stirring occasionally, until they are tender and liquid is released and evaporates, 8 to 10 minutes. Add sherry; cook until mixture is dry, about 4 minutes more. Cool at room temperature or in the refrigerator for up to a day.
On a lightly floured surface, roll the puff pastry into a rectangle 1/4 inch thick and big enough to enclose the beef. If using store-bought pastry, it may be necessary to lay out 2 pieces, overlapping, and roll them out into one piece. Spread the top of the tenderloin evenly with half the mousse, and spread half of the mushrooms evenly over the top.
Carefully invert coated tenderloin into middle of puff pastry, mushroom-side down. Spread another layer of mousse on top and sides of tenderloin. Spread remaining mushrooms over top. Fold up long sides of dough to enclose tenderloin, brushing edges with beaten egg to seal. Trim ends if necessary, then fold up, and seal. Carefully transfer tenderloin, seam side down, to a baking sheet, and chill at least 2 hours or overnight. Roll out any extra dough, cut into holly or other shapes if desired, and chill on baking sheet with beef.
Preheat the oven to 425 degrees. Place a baking sheet on the middle rack in the oven until hot, about 15 minutes. Decorate top of pastry with shaped cutouts if desired; brush with beaten egg. Make 2 to 3 slits in pastry for venting steam. Sprinkle with sea or coarse salt if desired. Carefully transfer beef Wellington to preheated baking sheet. Bake until pastry is golden brown and beef registers 120 degrees to 130 degrees on an instant-read thermometer for rare, 130 degrees to 135 degrees for medium rare, 35 to 50 minutes. Cover pastry with foil if it gets too brown while cooking. Let rest on a cutting board 10 minutes before slicing.