I am referring to US graduate schools here. I am now having schools that I like very much, but I am not sure whether I can withstand the competition towards PhD admission so I am thinking about also submitting an application for the less competitive master degree program (if admitted, I could apply to PhD in the same department after graduation as an alternative route to research). Is it bad to do so? The reason I am worrying is that I have seen people say that submitting 2 applications like this will convey a sign to the committee that you don't know what you want to do in the future. See the answer of this post
Based on the tag, I will give a US-specific answer.
Often, but not always, the difference between the masters and the first part of a PhD is that the PhD program comes with funding.
If your intent is to get the PhD eventually anyway, I would not recommend considering an unfunded masters. This is essentially the same as starting a PhD without funding. Reasons not to do that are discussed in Is it worth self-funding a PhD to attend a top 10 university?.