The short answer is, yes. Musicians have two copyrights with songs: one is for the actual recording and then another is for the composition. So, if it "sounds like" Formation, then that's using the compositions' copyright, but if it's an actual recording from Beyonce of the song, then that is additionally using the master recording copyright.
YouTube does allow for certain song covers to be posted on the site, thought. So, the two questions here would be:
1) Did you perform the instrumental version
and
2) does YouTube's Music Policies page have an entry for Formation by Beyonce, saying that covers are eligible for revenue sharing?
If both answers are "Yes", then you should be OK -- what will happen is even if you get a content ID match, you can check a box saying that this is a cover that you've performed yourself not using any part of the actual recording by the artist, and then you should be clear to share revenue with whoever manages Beyonce's copyright. (The revenue sharing mechanism serves as royalty compensation to the artist)
However, if either answer is no -- for example, that instrumental is just a backing track recorded by Beyonce's team -- then you are still violating her copyright. Or, if there is no entry for Formation by Beyonce in the database, or it does not say that covers are eligible for revenue sharing, then that means Beyonce and her team have not approved of that avenue.