If you want to pay with paypal via card then its in build functionality in magento
Enable "Enable PayPal Guest Checkout" in Magento2 Admin and also in paypal.
Now you can redirect to paypal and below login you can see option to pay with card
Whenever you place an order place the cart is converted to order and that cart will be inactive, so once the order place a new cart is created. so In your case when the order place and then payment get fails the cart gets empty by default.
So You can not prevent a cart from being clear as the cart is converted into an order. You can however set the cart as ...