Place a rail, and put a minecart on that rail. Then place a shulker/bring a shulker next to the minecart. It will go into it. Then place a wall 5 blocks tall next to the shulker minecart. Place a gravity block above the shulker minecart by tapping/clicking on the wall of blocks. When it falls, it will pass right through the shulker & onto the ground. If you do that again, the gravity block will float above the shulker.
Could not reproduce in 1.18.2 on Bedrock iOS. Gravity blocks simply become items upon reaching the shulker in minecart (The gravity block becomes an item both with and without a rail beneath). (It can be noted however that the gravity block does glitch to the side when placed two blocks above the ground (when there is a rail on the ground) however this would require a new bug report or may already exist)