Yes, carpet tape exists. It’s incredibly sticky and meant for rugs. Use it instead of regular tape. Stick a few strips on the sofa base, then press the cushion down.
How Can I Keep Couch Cushions From Slipping at Molly Cruz blog
Carpet tape is like superglue with manners. It holds tight but peels off cleanly when you need to vacuum. Your cushion will think it’s been welded in place.
Just don’t use it on delicate fabric. Test a hidden spot first. Otherwise, you’ll peel off the sofa’s skin along with the tape. Ouch.