Gradle shadow plugin changing string literals in the relocated dependencies

I am using Gradle shadow plugin to relocate some dependencies into a bundled jar.

for example, in my build.gradle I have the following:

relocate 'io.netty',''

I found string literals affected by this shading which caused some runtime errors with the netty dependency.

The following string literal is defined in the original dependency:

String staticLibName = "netty_tcnative";

In the shaded jar, this string literal is changed to:

String staticLibName = "thirdparty.netty_tcnative";

Is there any way I can prevent this behavior of changing the string literals?