I use to think about this a lot, and would constantly try to fix it - trying to look like I wasn't just playing with my dick while doing it.
But now that I'm older I realise most people know clothes do this, and that it doesn't really look like a boner anyway. And people generally aren't looking at me wondering if I've got a boner, and they probably don't care if I do unless I'm also staring at them or something. .... So now I just worry about accidentally staring at people. (And my eyesight isn't great, so it isn't always easy to tell.)