For the people who tried the trick the people in comments are spamming didnt work, you actually have to throw the pet on the ground and place a metal foundation (others dont work) OVER IT (yes you can place it over a shoulder pet) then switch to block and continue taming the snek

More Basilisk Taming & KO Tips