It is not safe, it will explode, leak poisonous gases, kill everyone and all puppies and kittens, smack Earth out of its orbit into the Sun, and so forth.
Having said that, some 6 months ago I noticed my 2 year old Samsung A71 had a slightly fat back, so after a few months (it was steady, not growing), I took it to a repair shack to have the battery replaced. The guy asked me if the battery was still holding normal charge, and I said yes, a whole day of usage.
He asked me if I wanted to just “deflate” it. Well, yes.
So he did what you said, and the universe is still unharmed.
But in my case it was just gas trapped in the battery envelope; probably it overheated once while charging, but there was little or no damage to the battery itself. If even after passing gas yours is still swolen, it may mean your electrodes are deformed, which is probably more risky than my case.
I’m not in any way recommending you to keep using it. It worked for me, but I’m a very lucky person.
Fried leaf cutter ant queen abdomen (it’s just a ball full of eggs) reminds me of bacon.