WP_Query breaking the loop in a nested loop

After using the WP_Query in a custom loop, you might need to reset the global query object. Try calling the wp_reset_query() function after your while loop.

https://developer.wordpress.org/reference/functions/wp_reset_query/