No, but it is an avoidance mechanism specifically designed to avoid tax on income.
If an independent third party has deemed your stock sufficiently valuable (and stable) to lend money against, then you should be taxed on that loan. You can get a credit when you repay the loan (to offset tax on the income you used to repay).
Not familiar with the US tax code, but if Musk borrows $1b with a portion of his Tesla stocks as collateral, will he be charged capital gains tax by assuming that these stocks are now worth $1b?
When you die, the value of the stock at time of death gets whacked by inheritance tax, which is 40% at the federal level and 20% at the state (in Washington) level.