You've got to remember that even next to a sunny window, the light is coming from one direction only. In nature outside, light is bounced all over the place and the only direction it doesn't come from is straight down.
You've also got to remember the pupils in our eyes open wide to let in more light when it's not as bright. To our brain, a moderate amount of light with wide open pupils will look just as bright as full sun with pinpoint pupils. There's no such adaption on plants.
I suggest to everyone who has a smart phone (who doesn't now?) and loves houseplants to download a free light meter app. It might not be as highly accurate as those meant for photography but it will give you an idea just how dim the light is where a houseplant is placed. Many houseplant sites will give optimal light intensity (measured in LUX) for different houseplants. Until one really knows light intensities well, it's a useful tool to have.
When a plant's not growing at its full potential (lower light level or other causes), they shouldn't be watered as often. They don't need as much water, regardless of the plant, nor do they need as frequent fertilizing.
If it's impossible to give your plant a brighter location, you might want to try what I've done - not for a housplant but to develop strong sturdy seedlings - but it'll work for your cactus. Cut out a square or rectangle of cardboard, wider and taller than your plant. Glue or tape aluminum foil to one side of the cardboard so the dull side is hidden. Place that behind your plant so some sunlight will bounce to the back of the plant. Every week or two, turn the plant around so both side will get the same amount of light. Fold part of the cardboard so the plant sits on it holding it in place and rig up cardboard or whatever to keep the vertical part upright.
I did a crude drawing on my phone to show what I mean. Sunlight is yellow, cardboard is brown and foil is grey. I hope my description and drawing is understandable.