I watched a cosleeping mom on YouTube detail her journey and she recommended a bed rail, we bought it for about $100 off of amazon: Bed Rail for Toddlers Extra Long... https://www.amazon.ca/dp/B07Z6L92ZQ?ref=ppx_pop_mob_ap_share
We haven’t installed it yet as she isn’t rolling yet so right now we just use a pool noodle under the sheet as a bumper but there were some 3- sided options similar to this too :)