Going AFK in response to taxing is not okay. That's quitting/giving up, and if you do that, you deserve any ban coming your way.
You aren't being really clear what you mean by "taxing". Are people coming while you're in lane and last hitting your minions? Or are they coming in and cleaning up a wave after you died or shoving the wave in after you get a kill? Because the latter two are not taxing, they're the right play.
If you're dead or returning to lane and a wave is crashing on the tower, that gold/XP would be wasted. There's nothing wrong with somebody collecting that gold if you can't. That isn't taxing.
If you just got a kill and your jungler comes in to hit minions, they're helping you shove it into the tower, not taxing. Even if they take the gold from 3-4 minions, shoving the wave into the tower denies your enemy a lot more gold and XP than what you're losing, deals a bit of damage to the tower, and resets the lane to push back towards you, so you can now play from a safer position and collect your gold and XP.
If people are legitimately taxing your lane (i.e., you are in lane and they come and last hit minions without creating a play or tower pressure pre-15 min), then all you can do is try to work around them. Hold off on auto attacking and let them get the minions low for you to finish off, or use the presence of your jungler to scare the enemy off and shove the wave.