The Bug
Rails do not connect with each other or allow minecarts to be placed on them if vanilla data pack is disabled.
How to reproduce
1. Run {color:#aaaaaa}/datapack disable {color}{color:#55ffff}vanilla{color}
to disable the vanilla data pack.
2. Place some rails beside each other.
3. Try placing a minecart on them.
Edit: Duplicate of MC-123029.
It works just fine for me. (yes, both the rails and the minecart function properly)