Like everyone else has said, a basenji will easily learn how to get out of that haha
I recommend crate training, honestly. it’s safer and more reliable than an ex-pen and it’s important for dogs to have that ‘safe’ space where you can put them in emergencies. Crates aren’t cages - think of it more like a nest or a cave. It’s a comfortable safe place, not a punishment. Most of the dogs that I’ve owned have gone in of their own accord, or will ‘put themselves to bed’ - they like it. My current basenji sleeps in hers at night and goes in when I have to leave the house, and it gives me peace of mind to know that she’s safe (and also the furniture is safe lol). It sets important expectations and boundaries too.