The verdict
Same muscles, different tools. Both list the chest as the primary muscle and the front delts and triceps as secondary, with the same joint actions: shoulder horizontal adduction and elbow extension. The barbell lets you load heavier, track a single number and train in strength programs built around it. The dumbbells let each arm work on its own, travel lower than a bar, and be set down safely without a spotter. Pick by your goal and your setup, not by which one is supposed to be better.
Muscles, equipment, force and level from the PasteLift exercise library records for the bench press and the dumbbell bench press. Sets and reps from the ACSM position stand, cited below.