I've been using the Thule Instagators for about a decade. I have the original version but these are the same thing more/less. Only issue is as someone pointed out an e-bike ain't gonna be light so getting it in/out might suck. For normal bikes these are the way to go though.
https://www.thule.com/en-us/bike-rack/truck-bed-bike-racks/thule-insta-gater-pro-_-501501
https://www.thule.com/en-us/bike-rack/truck-bed-bike-racks/thule-insta-gater-pro-_-501501