Cargo Net Retainer
I had an old cargo net from a past truck / SUV that I had saved and found it to work very well to retain the cooler while also adding an extra location to place loose / wet gear or trash that is out of the way.
I just used some wire ties to secure it to the leaning post and I am sure one could find other types if cargo nets at retail or automotive stores that would also work.