If you sell right when it vests there's a negligible capital gain (or loss). The value of the RSUs are taxed at regular income when they vest. Any difference between that value and the value when you sell them is a capital gain (or loss) and that is what's subject to capital gain taxes. i.e. if you sell once they vest the capital gain/loss is essentially zero (because the stock hasn't had time to move much)
e.g. if your RSUs are valued at $1000 when they vest and you sell it a few minutes later and the value is now $1005 you'll pay regular income taxes on $1000 and have a $5 capital gain (i.e. when you file your taxes the cost basis for the holding are $1000, not $0)