What can I use as an alternative for an underwriter's knot?
If it is a fairly lightweight fixture, you could try a zip tie or two around the cord.  This may not work depending on how hard the cord is and how heavy the lamp is.  But I have used them with light weight pendants and cords that had some flex so the zip tie could squish the sheath a bit to keep it from slipping.



Another option, if there is enough space, is to use a Waterproof Cable Gland they tighten onto the cord and depending on the cord material may not slip.  But there may not be enough space for one.  I seem to recall having a pendant light once that had something like this built into it to allow the height to be adjusted.