The thing that actually shifted things with my niece was getting her genuinely invested in something that required her hands and attention in a way her phone doesn't. My sister started a small garden with her, nothing fancy - just some potted plants on the balcony. Now I work the firefighter schedule so I'm home weird hours, and I've got like thirty plants around my apartment. When my niece comes over, she actually asks about them. She started propagating a pothos and checking on it between visits. The point isn't the plants specifically - it's that she found something tangible that made scrolling feel less necessary. Real results take a few weeks though, not days.
The angry reaction you're getting when you confiscate the phone? That's real frustration, but it's also kind of masking something. Sometimes kids that deep into it are dealing with anxiety, or they're avoiding something (homework stress, friend drama, whatever), or they're just genuinely bored with their actual surroundings. Taking the phone away doesn't fix any of that. Instead, try sitting with her without judgment and actually asking what she's getting from it. Is it the community? Entertainment? Escapism? Then work backward from there. If she's stressed about school, help with that. If she's lonely, help her find actual social outlets.
Also, and I know other people touched on this, but the algorithm thing is real and she won't beat it through willpower alone. She needs friction between her and the app - not by confiscating, but by making it inconvenient. Longer unlock codes, app limits that actually stick, her phone on a charger in the kitchen at night. But do that with her input, not as punishment. Tell her you're helping create barriers because you get that the app is literally designed to trap her attention. She might respect that more than just having stuff taken away.