Interesting
Those who know me are aware that I believe shorts on foreigners are inappropriate anywhere in SE Asia other than sometimes in Singapore and at beach resorts (and then only at the resort not in town). Yes you will be targeted as a tourist not an expat. Additionally in many countries you will offend. Why set oneself up as a target when it is unnecessary. It is much better to fit in and appear to be the foreigner living there rather than the tourist. Sorry, jpatokal but there is not much that can be done to reduce your profile or even mine but coming across as an expat. gets more done than coming across as the often viewed "crass" tourist.
I wear jeans everywhere but am quite heat tolerant. They are more comfortable to me than khakis for my leisure travel. They also do not show any sweat stains as do lighter colored clothing. My shoes are always leather rather than sports shoes.
From considerable experience, this works for me. Most recently taking a group from Singapore to a seldom-visited-by-foreigners portion of Southern Johor and with a group to and in Kuching, local people looked to me as the foreigner living in the region who was herding a group of tourists on an excursion. Low profile brings one, in general, better interactions and less hassle than coming off as a "tourist".
A smile and tempered, controlled low in volume and tone conversation also does wonders.