Some preliminaries
The question you are asking must absolutely necessarily be answered in more than one dimension. This is because a one-dimensional flow will always be irrotational and will be characterized by a single streamline. So I am going to describe the problem in the 2 spatial dimensions $x,y$. Then, we will have vectors such as the velocity $\vec{v} = (v_x, v_y)$.
Irrotational flow
I will also have to use the partial derivative, a derivative with respect to just one variable while the rest is being kept constant. The condition of an irrotational flow is then given as
$$\frac{\partial v_x}{\partial y} = \frac{\partial v_y}{\partial x}$$
When you go into vector calculus, you will see that when this condition is violated, the velocity field creates a small vortex. So the irrotational condition asks that no such vortices are not present in the flow.
Lagrangian derivative
Now let's take a look at the concept of a Lagrangian derivative $D/dt$. This derivative is asking what happens to a quantity in time if I follow it as it is being dragged by the streamlines. For instance, you may have a stationary flow where at every fixed point in space the variables see no changes, but if you follow the streamline, the element is sped up, slowed down, pressurized, depressurized... This is exactly the case where the partial derivative of any variable with respect to the time $t$ will be zero, but the Lagrangian derivative will be nonzero.
We will be talking only about stationary flows, and in that case the Lagrangian derivative of any quantity $q$ is simply defined as
$$\frac{D q}{dt} = \frac{\partial q}{\partial x} v_x + \frac{\partial q}{\partial y} v_y$$
If you would ever like to learn vector calculus, the expression above is just equivalent to the projection of the gradient of $q$ in the direction of $\vec{v}$, $Dq/dt = \vec{\nabla}q \cdot \vec{v}$.
Conservation of Bernoulli integral along streamlines
So the Bernoulli integral for an incompressible inviscid fluid in a homogeneous gravitational field accelerating in the $-y$ direction is defined as
$$B = \frac{1}{2} \rho (v_x^2 + v_y^2) + p + \rho g y$$
Now we assume a stationary flow, and write down the Euler equations for it
$$\frac{D v_x}{dt} = - \frac{p_{,x}}{\rho}$$
$$\frac{D v_y}{dt} = - \frac{p_{,y}}{\rho} - g$$
You should know these equations as telling you what acceleration does a fluid element experience when moving through specific pressure gradients and gravitational accelerations.
Now let us take both the Euler equations and 1) move all the terms to the left hand side, 2) multiply the $x$-equation by $\rho v_x$ and the $y$-equation by $\rho v_y$, and 3) add them together. What you get is
$$\rho (v_x \frac{D v_x}{dt} + v_y \frac{D v_y}{dt}) + (\frac{\partial p}{\partial x} v_x + \frac{\partial p}{\partial y} v_y) + \rho g v_y = 0$$
We can rewrite this a little bit more by noticing that the terms involving $p$ are just equal to $Dp/dt$, and also by realizing by direct computation that we can write $v_y = D y/dt$. We then get
$$\rho (v_x \frac{D v_x}{dt} + v_y \frac{D v_y}{dt}) + \frac{Dp}{dt} + \rho g \frac{D y}{dt} = 0$$
Let us now ask what happens if we take a Lagrangian derivative of $B$
$$\frac{DB}{dt} = \rho (v_x \frac{D v_x}{dt} + v_y \frac{D v_y}{dt}) + \frac{Dp}{dt} + \rho g \frac{D y}{dt}$$
But we see that this is something which we have just proven to be zero out of the Euler equations! That is, we get that as long as Euler equations are fulfilled and as long as the fluid is stationary, we have
$$\frac{D B}{dt} = 0$$
But notice that this proof only tells us about the derivative of $B$ along the streamline!! I.e., one can have a slightly different $B$ constant along every different streamline and it is in no conflict with the streamline-conservation of $B$.
Bernoulli integral in irrotational flows
Let us assume we have a stationary irrotational flow. Now, the Bernouli function will be constant if its derivative along any spatial direction vanishes
$$\frac{\partial B}{\partial z} = 0\,, \,z=x,y$$
Let's first make a derivative with respect to $x$
$$\frac{\partial B}{\partial x} = \rho (v_x \frac{\partial v_x}{\partial x} + v_y \frac{\partial v_y}{\partial x}) + \frac{\partial p}{\partial x} $$
Now we use the irrotational condition $\partial v_y/\partial x = \partial v_x/\partial y$ and we obtain
$$\frac{\partial B}{\partial x} = \rho (v_x \frac{\partial v_x}{\partial x} + v_y \frac{\partial v_x}{\partial y}) + \frac{\partial p}{\partial x} = \rho \frac{D v_x}{dt} + \frac{\partial p}{\partial x} = 0$$
where the second equality holds because of the $x$ Euler equation. In a completely analogous way we use the irrotational condition in the $y$ case and we get
$$\frac{\partial B}{\partial y} = \rho \frac{D v_y}{dt} + \frac{\partial p}{\partial y} + \rho g =0$$
where now the second equation holds because of the $y$ Euler equation.
In summary, stationary irrotational flows have a constant value of the Bernoulli integral all around the flow. This is hard to grasp by physical intuition, but it might be easier to think about it the other way around; for a stationary flow to be irrotational, it must necessarily even out the value of the Bernoulli integral throughout the flow.