Or if you’re going to take Anakin to Naboo, have him join the space battle on purpose. Have him fly to try and help the pilots take out the ship above.
But yes, a radical change would be to just leave him at the temple to be trained or in the custody of the Jedi council because he’s supposedly this chosen one.
Taking the chosen one into the path of the Sith doesn’t sound like such a brilliant idea.