Ceiling lamp, 14 gauge, not 18 gauge
From your profile, you appear to be in the US.
The applicable US standard UL 1598 (you can consult the standard yourself, however it's a bit opaque and it costs money to get it) states a minimum conductor gauge of 18 AWG. The same minimum standard applies in Canada. Subject to actual fixture requirements, of course.
UL approved fixtures for Mexico, however, are required to have 16 AWG (1.307 mm^2) wires, so maybe you could find some made for that market.
Also lamps made where the power may flow through to other lamps have heavier requirements 14 or 12 AWG.
Or just find a better wire nut and/or solder the wires before sticking the wire nut on. Solid conductors to thin stranded tends to be a bit dodgy in an all-plastic wire nut.