With battery installed and no shore power on the trailer, insert a 10 amp fuse between the slots of the umbilical cord, that are on both sides of the notch.
What this does is, supplies power to the running lights from the trailer battery. If they light up and operate normal, your problem is in the truck.
Your description really sounds like a poor connection between the umbilical and the truck plug. Maybe an intermittent ground problem, could even be a fuse issue.
If your truck is wired similar to a Ford, it has a fuse / relay (in fuse box under the hood), that is solely for trailer running lights. There is a seperate fuse / relay for brake / tail / turn lights. That is why you can have one set of lights working and the other one, not.
Check owners manual for fuse / relay locations on the truck.
18 Nissan Titan XD
12 Flagstaff 831FKBSS
Wife and I
Retired Navy Master Chief (retired since 1995)