How to generate constant 38 kHz square wave for IR light source?
Your effort is misdirected; these receivers are not all that sensitive to precise frequency but they will not maintain output with a constant modulated signal.

Instead, they are engineered to look for "bursts" of modulation and will reject noise that does not look like a train of pulses of modulated carrier; to get them to continue to work you will need not one signal generator but two, one for the modulation and the other to create the bursts in the envelope of modulation.

The first generator produces 38 KHz modulation.

The second generator keys the first generator on and off at a rate within the window of the types of remote signals the receiver is designed to accept.

Typically, you use a microcontroller; use a timer channel divided from the MCU clock to the produce the 38 KHz to closest approximation you can. It does not need to be exact.

Then either have software, or another timer channel key this on and off.

(You could probably use 556 dual timer; but MCUs that can do this are well under a dollar in quantity, require fewer support components, and can do other things as well).

If you were expecting constant output from the detector, you will need to rethink your system design; instead, you probably need to follow the detector with a pulse-stretcher that can fill in the gaps between your transmit pulses; should your transmission cease, the pulse strether will extend the last pulse from the receiver, then stop.