Unless your train ticket is ticketed in conjunction with your airline ticket (I'm thinking Lufthansa and their DB connections), you will be considered to be entering Germany. Therefore the virus variant country restrictions will apply when checking in with your airline.