Is it possible for a frame's geometry to affect how much of the cyclist's energy goes into forward motion?
Only if it means that the rider can't get into their best position for power and/or aerodynamics. I.e. if the head tube is too high or the seat tube angle so steep or slack that no post will get the rider into their best position.
Technically if the rider can't get as aero as they desire, they're still getting the same energy into forward motion but they'll be slower due to more aero drag. How much slower depends on how much they're riding in the wind in a particular race.
Lots of people claim that a less stiff bike is slower. But other people point out that the frame is a spring with little loss and flex is returned as power elsewhere in the pedal stroke. So far no one has been able to measure or model power variations due to frame flex. Modeling is particularly difficult because we don't fully understand what all the muscles are doing, and it probably varies between individuals anyhow.
Not geometry, but there are aero differences between frames. The total difference is small compared to differences in postion, but they're real. Saving a few watts for the entire race, more if you're out in the wind, might be the difference between winning and a close second. There are some models that attempt to estimate the anaerobc reserve (AWC or W'). One could construct a simulation using real race data and those models to see if the slight savings in power output made a significant difference in anaerobic capacity for the sprint. Keep in mind that the differences between top pros is not that great- not like in amateur racing. As evidence look at all the week long stage races where the leaders are seperated by only a few seconds. A small difference may be more significant to a top pro than to local amateur racers.
Bike handling can make a difference in descending confidence and thus speed. Sometimes that's a factor in a race.
Sorry that was a long winded way to say "it depends" and "we don't know".