Could you argue in favour of something you disagreed with? Could you take the side, against your personal beliefs, and come up with a great debate? Debating is a skill. It’s not easy to come up with strong, winning points when you don’t agree with the overall ideas. But, as a writer, that is what you have to do, sometimes.
If someone pays you to write, speech write or ghostwrite something for them, you have to do it to the best of your abilities. Once you take on a job you need to do your best with it. Your personal opinions can be useful as you will already know the reasoning behind the opposite point of view.
I think one challenge would be keeping your focus and not letting your own point of view creep in to influence the writing/ debate. It would be so easy to slip in a subtle zinger. So easy to not try to really come up with the best points and just settle for your first ideas. But, you’d be selling yourself short that way.
As a writing exercise debating against yourself is a great way to get your brain working. Could you apply this to writing fiction too? If you were stuck at a point of choice for a character, would it help to write a scene where they do the opposite to what you feel they should be doing? By writing what you don’t want them to do could you not find what you want them to do, think or feel?