I guess the distinguishment standard between を and で is whether the verb involves movement right?
If so, then 旅行する is certainly a movement verb and thus を sounds more natural here. So we almost won't say 東京で旅行する, because in this case we won't stay somewhere in Tokyo forever right?
But when it comes to the verb 遊ぶ, why is it more common to use で rather than を to indicate location? Is it that in Japanese people's opinion, 遊ぶ is a verb that doesn't involve movement?
If so, then 東京で遊ぶ should have a different meaning from 東京を遊ぶ, where 東京で遊ぶ means someone stays still somewhere in Tokyo forever, and 東京を遊ぶ means someone travels all around Tokyo.
But I think 遊ぶ should certainly involve movement, because it means someone is having fun, which is often a continuing changing process, like: At first someone is interested in something, and after sometime he begins to pay attention to another interesting thing and after sometime he starts to have fun enjoying another thing and so on? So I cannot understand why 東京で遊ぶ instead of 東京を遊ぶ.
To be honest, I think in this case, 東京を遊ぶ is more reasonable and it is almost interchangable with 東京で旅行する.