I’ve answered that same question just 12 hours before you asked, please try to use the search function
You’ll find that answer in the root topic as well: FP4 Root Access is possible, maybe a bit risky - #61 by Aaanze
TL;DR it’s possible, but it’s complicated and by no means reliable. If you depend on SafteyNet for something important, I’d suggest not to use Magisk.