They will give you essentially the same performance. Motherboards for the i5 are be slightly cheaper and it supports DDR4, so if you're on a budget I would go with that. If you want an upgrade path for the future and don't mind spending a little more for DDR5, then go with the Ryzen.
I have the same question myself as i am about to change setup. Since BeamNg is highly CPU dependent and more cores and threads are better, wouldn't the i5 be able to spawn more cars? or the e-cores aren't as efficient as the p-cores?