I’ve had luck by throwing in bits of shrimp or fish into the tank one at a time and creating a feeding frenzy.
Once my dats and their tankmates start aggressively competing with each other to grab each morsel first, I alternate with pellets. Mine would mindlessly hit the pellets as a reaction bite and spit it out. But after multiple prolonged sessions, by some miracle, they stopped spitting it out.
Not sure if it was coincidence or dumb luck, as I’ve also had some absolutely refuse pellets; however, this has worked well for me in the past