When I try out Ed25519KeyIdentitywith exact same code as above and the same .pem file I get an error:
Ed25519KeyIdentity
.pem
Error: bad secret key size
P.S.: Linked forum posts about the same subject 6169 and 9456