Sadly CRAM also has the 2GB size limit for chromosomes. It's something fixed by CRAM 4.0, but that needs a second specification maintainer to proceed.
Note for things that are REALLY long, don't discount SAM! When compressed with bgzf it's not really any different in size to BAM (possibly smaller), and with htslib it's not that much slower. Infact with multi-threading it can sometimes outperform BAM even. Obviously it'd also need CSI indices.
SAM has no limitation on length as it's textual. (Well it's 2^63, but that's more than enough.)
As to the actual problem above - it's possible this may have been one of the things we fixed in CSI. Please make sure you're using the latest samtools/htslib first before reporting issues.
You should probably show your code for making the realigned bam, that seems to be the cause of the problem.