How to sort custom query loops by stock status and publish date simultaneously?

Hello,

I have set up a custom query loop archive where the output is existing woocommerce products sorted by their stock status. Everything seems to be working alright up to this point

Here are the settings of the query loop:

Now, the problem arises when I try to sort the products by publish date, too. I can see that there is no secondary order-by option available, and I have tried various solutions offered online, such as adding a custom code to function.php that would edit the sorting, but I have had no success.

Can anyone offer insight or tell me a solution that worked for them? Is there a plugin that would always put out-of-stock products AFTER in-stock products (all existing archives and query searches on the website)?

Thank you.