There's not a lot in it between the Ryzen 3 5300 and the i3 i3 1115G4 so the RAM really settles it. RAM upgrades aren't expensive though. Saying that, I think you can do a lot better for under £400 - keep an eye out on hotukdeals for any bargains that appear:
Ryzen 5 with a 512gb SSD and 8gb RAM: https://www.hotukdeals.com/deals/len...opebay-4024601
i3 with 256gb HDD and 8gb RAM for under £300: https://www.hotukdeals.com/deals/asp...s29900-4024077
i5 (11th gen) with 256GB SSD and 8gb RAM: https://www.hotukdeals.com/deals/len...s-blue-4023492 https://ao.com/product/82hs00m7uk-le...95582-251.aspx