Even under iPhone OS 2.x my iPhone always locked the screen and disconnected the call, which is a major issue for me since I have a defective power button that presses in way too easily.
It will only disconnect the call if you don't have speaker phone on or headphones plugged in or bluetooth. Any other time, you can lock it without losing the call.