The square output of the LF generator is displayed in red on the oscilloscope
The GBF square signal supplies a serial RC circuit
The serial RC junction point is displayed in blue on the oscilloscope
The delay of the blue signal with respect to the red at the end of the transition
The voltage across the capacitor is overdue!
I reversed the position of the resistor and the capacitor to observe U in R
The blue voltage in R becomes alternate and represents the charge and discharge current of the capacitor
And yes, generator or receiver reverses the direction of electric current: hence the alternative ...
All the alternatives are not sinusoidal :-)!