They are both very powerful CPUs and would be great choices for what you want to do.
However, Ryzen CPUs tend to offer a superior multi-threaded performance (plus it also has a higher core and thread-count compared to the i5-8700k), which is what most desktop applications including FL-Studio thrive on.
This mea s that you will be able to achieve better and faster results during renderring. So I would recommed going for the Ryzen 7 2700X in this scenario.
Plus, it comes with an included cooler as well as 3-year warranty instead of 1-year with Intel.
I hope this helps you.
Let me know if u need help picking a motherboard.