Improving physics-informed DeepONets with hard constraints