Welcome to the site !!
Its possible that you have some shims in the wrong place ?? , or you have the shift drum/forks installed incorrectly ?? , or they were worn and upon re-assembly the issue got worse because of a shim misplacement ?? , sometimes just 1 shim in the wrong place will offset a gear enough to cause this , especially if the gears had any kind of wear on the cogs , if they have any rounding to them the gear will not go all the way to the other and slip back and cause it to pop out of gear
Also , on the clutch side the sift actuator could be mis-aligned or bent , or the spring not seated properly , what started the issue ?? , it was shifting fine , then it just started skipping 4th ?? , or did it do it from the first after re-assembly ??
Did you by chance drop the bike on the shifter ??
Any of these things can cause your issue , if it worked fine before , then it has to be something you did during assembly
A little more detail as to what happened , like it was working fine and you were speed shifting (without the clutch) and jammed the shifter , or you fell on that side and jammed the shifter , or it did it the first time you rode after rebuild and does it every time , or just occasionally , were you riding easy (trail riding) or at the track ?? , was it on the first ride , or after several uneventful rides ??
But i am guessing the issue will be in the shift drum , or on the clutch side with the actuator , or a worn cog (the fingers that stick out of the gears)