This is a question with an answer that is always changing.
In general, the answer is no. You cannot get cash off of a Visa or Mastercard gift card. Even when a PIN is present and you select “Debit” at checkout, gift card issuers specifically prohibit the “cash back” option.
If you really want cash instead of a gift card, the better option is to sell the gift card–but safe ways to do that have decreased over the years. You’re better off finding a way to use the full value of the gift card yourself.