Would something like this with a twin bed work?
Bed Rails for Toddlers - 60"70"80"Extra Long Baby Bed Rail Guard (3 Sides: Perfect for Twin Bed, Include 3 Sides) https://www.amazon.com/dp/B08QMJRV5S/ref=cm_sw_r_cp_api_glt_fabc_QS471EBGECYANB33W53T?psc=1