Steps to reproduce:
This bug is somewhat dependent on render and simulation distance. From the values I tested, 32/32, 16/16, 8/8, 7/8 and 8/7 produce the bug, while 32/5, 2/5 and 2/32 don't. Best choose 32/32.
Make a single biome (desert) world with the seed "1566450010406945717".
Enter spectator mode.
Execute "/gamerule doDaylightCycle false" and "/time set midnight".
Execute the following command: "/tp -2500 100 0".
Fly in the positive Z direction until you see a submerged ruined portal at approximately -2500 670.
❌ The lighting around the portal is broken; one half is completely dark and the other is bright, separated by a chunk border; furthermore, there is light on the water surface that is missing a source.
Note that merely teleporting to the ruined portal's coordinates does not produce the bug.
Edit: This bug exists since at least 1.18.2; before 1.18.2, the ruined portal was not submerged and the bug does not occur at these coordinates, so I have no way to tell when it was introduced.
Second found example:
Choose render and simulation distance 32/32.
Make a single biome (desert) world with the seed "3387133703615993292".
Enter spectator mode.
Execute "/gamerule doDaylightCycle false" and "/time set midnight".
Execute the following command: "/tp 0 100 390".
Fly in the positive X direction until you see a submerged ruined portal at approximately 330 390.
❌ The lighting around the portal is broken; one half is completely dark and the other is bright, separated by a chunk border; furthermore, there is light on the water surface that is missing a source.
Third found example (in a standard world!)
Choose render and simulation distance 32/32.
Make a standard world with the seed "-7140106853293537955".
Enter spectator mode.
Execute "/gamerule doDaylightCycle false" and "/time set midnight".
Execute the following command: "/tp 8965 100 9000".
Fly in the positive Z direction until you see a (non-submerged!) ruined portal at approximately 8965 9300.
❌ The lighting around the portal is broken; one half is completely dark and the other is bright, separated by a chunk border.
Fourth found example (non-desert portal)
Choose render and simulation distance 32/32.
Make a standard world with the seed "-8564942748222529924".
Enter spectator mode.
Execute "/gamerule doDaylightCycle false" and "/time set midnight".
Execute the following command: "/tp 27585 100 28500"
Fly in the positive Z direction until you see a (non-desert) ruined portal at approximately 27585 28825.
❌ The lighting around the portal is cut off along a nearby chunk border.
Can confirm. In my testing, I used render and simulation distance set to 16.