If you try to get this result:
Then, you will need to navigate to WooCommerce > Settings > Products > Display and for the Default Category Display, choose Show Both.
If you try to get this result:
Then, you will need to navigate to WooCommerce > Settings > Products > Display and for the Default Category Display, choose Show Both.