It work only with the name, the solution I think would be to make it the cleaner you can. The best way would be STEP 1 : get the value from expression and make it work, STEP 2 : fill the field with clean name to use it in atlas.
To get the layer name clean you can use the expression builder. The function layer_property
can give you any property of each layer including name. You have to give the layer ID as the first parameter, to get it with no doubt you can double-click on the layer you want.

An example layer_property( 'Hebergement_touristique_14bd11cf_70fa_4d97_92cf_d51f618762f2', 'name')
will give the name that would work.
Then if it work well step 2 : you complete your field with the good data. My advice is to use field calculator and creat a new field with a formula like this :
CASE
WHEN "id" =1 THEN
layer_property( 'Hebergement_touristique_14bd11cf_70fa_4d97_92cf_d51f618762f2', 'name')
|| '|' ||
layer_property( 'Itinéraire_V9_77e2d77c_427c_40f6_8fc4_e47a8f2b6455', 'name')
WHEN "id" =2 THEN
layer_property( 'Hebergement_touristique_14bd11cf_70fa_4d97_92cf_d51f618762f2', 'name')
WHEN "id" =3 THEN
layer_property( 'Itinéraire_V9_77e2d77c_427c_40f6_8fc4_e47a8f2b6455', 'name')
ELSE
layer_property( 'Hebergement_touristique_14bd11cf_70fa_4d97_92cf_d51f618762f2', 'name')
|| '|' ||
layer_property( 'Itinéraire_V9_77e2d77c_427c_40f6_8fc4_e47a8f2b6455', 'name')
END
Verify you don't have different layer with the same name and that your form field is not set as map value, the represent value and the real value would be different. Then you can be sure of your field and troubleshoot any strange character or rules.