Just went back to the server room and tried again and I realise now the rails are spring loaded and you need to push them back until the server clips into the rack. So mystery solved.
Generally when replacing PowerEdge servers I can reuse the previous generation's sliding rails. However these R340s are giving me problems as they don't appear to be compatible to anything. I found the DellEMC Enterprise Systems Rail Sizing and Rack Compatibility Matrix which tells me that A12 rails are compatible. So we bought the A12 rails but they have the same problem as the previous rails I was using for the R320s. The new R340s have their first mount point set back from the front. So when I place the server in the rails they end up sticking out of the front of the server cabinet.   What rails are compatible with PowerEdge R340 servers? Thank you.
Rails for Poweredge R340