Some earlier coaches with slideout rooms came with slideout bars.
I think shower curtain rods, shortened, would work if they offered enough adjustment range to get in place then still tighten. I think they'd have to be the threaded twist-to-tighten type. Not spring loaded but I'm not sure.
Harbor Fright used to have a bar, meant to expand between the sides of a pickup truck bed. Used to keep cargo from sliding around. Those worked the same way as the "RV" ones, at about 1/3 the price, but would have to be shortened. I looked today to link it here and didn't find it... OOPS... 96811 "Ratcheting" Cargo Bar at $22. They seem to have gone up-scale from the old Twist Type.