Generally it's true that hilly courses are slower. This is because the aerodynamic drag force is proportional to the square of the apparent wind, and a hilly course will have slow parts (uphill) and fast parts (downhill). The squared velocity term means the total energy required to complete the course in a given time increases when the speed is more variable.
However, 1% is not much of a grade at all. It's not enough to say with certainly whether one course is faster than the other when considering other factors which may vary between the two.
Does the out-and-back course require braking to turn around? Re-accelerating the bike requires work.
Which way is the wind blowing? If the hilly course has even a gentle tailwind the whole way it will likely be faster than the out-and-back course which will have a headwind for half of it.
Does one course have more turns than the other? Turns, like hills, make the speed more variable. They also require the rider to assume a less aerodynamic position or risk a crash. If the turns require braking, that requires even more energy to overcome.
Steve Gribble has a nice calculator and also some detailed explanation of the physics involved. Let's put some numbers on it by assuming the cyclist will maintain a constant 250 watts, and otherwise using the defaults for weight and aerodynamics from the calculator.
On a completely flat, windless course, 250 watts will achieve 22.65 mph, for a completion time of 8:13.8.
On a 1% incline, 250 watts yields 19.85 mph, completing the first half of the course in 4:41.73. The second half with a -1% grade is completed at 25.50 mph in 3:39.31. The total time is 8:21.04.
These estimated times don't account for the initial acceleration, but since that's pretty similar between the courses we can ignore that for comparison.
Thus the hilly course is 7.44 seconds slower in highly idealized conditions. In practice, an experienced cyclist will use a more efficient pacing strategy for the hilly course, which is to put in a little more power on the uphill portion and a little less power downhill, which will further reduce the time difference.
This is not a big difference, easily less significant than the other variables previously described.
Weight is also not very significant. Running the hilly example again, but with a rider 5 kg heavier, the uphill time is 19.73 mph and downhill
25.54 mph, for completion times of 4:43.44 and 3:38.96 respectively, for a total of 8:22.41. That's only 1.37 seconds slower than the lighter rider. The heavier rider completes the climb in more time but descends faster, but this means a more variable speed and thus higher aerodynamic losses.
But in practice, a heavier rider is also able to produce more power, and this gap will be less.
We can continue to run numbers, but I believe the point has been made: 1% is a very slight grade, with only minor effects. If you had said 10%, we could definitively say the course will be slower, and it will favor smaller, lighter riders which tend to have a higher power to weight ratio. But at 1% aerodynamic effects are still dominant by a significant margin, and as such neither the completion times nor the optimal rider type are very much different from a flat course.