What happened??? I thought arena trap prevented fleeing???
This is because Latios has the ability Levitate, which negates the effect of Arena Trap. Levitating Pokemon, Flying type Pokemon and Pokemon that are being affected by Magnet Rise or Telekinesis are all immune to Arena Trap.
Latios has the Ability Levitate and is immune to Ground type moves.
Pokémon rendered immune to Ground type attacks are immune to Arena Trap. This includes Flying type Pokémon, Pokémon with Levitate, and Pokémon affected by Magnet Rise or Telekinesis.
Hope I helped :)
Arena Trap doesn't affect Pokemon with the Ability Levitate, which Latios has. It also doesn't affect Pokemon that are Flying types or are under the effect of Magnet Rise or Telekinesis.
Instead of using Arena Trap you could use a Pokemon with the ability Shadow Tag or a move like Mean Look.
Latios is a roaming Pokemon, so it has the ability to escape.
But, Diglett, with Arena Trap should have prevented Latios to escape,
BUT, latios has the ability Levitate, so it negate the ability Areana trap so therefore was able to escape.
Source: Knowlege, experience
Tip: Use an Pokemon with other preventing escape abitilies such as Shadow tag or moves like Mean look