See my answer here: Questions about scylla java driver 4.x ShardAware feature and NAT issue - #2 by Lorak for a description of shard awareness and advanced shard awareness. Generally this error shouldn’t very be harmful. It affects only session creation, but after it is fully created (which may take a bit more time because of this problem) it will work exactly the same.
As to why it may occur - probably Docker on Windows uses some kind of NAT between Scylla and the driver. You may try to run the driver inside Docker too, but I can’t promise it will help. Maybe some Docker support channel would be a better fit for this question?
I’m not sure I get what you are aiming to do.
This code fragment:
.getCache()
.request(session.prepare(INSERT))
will always call session.prepare which will send a PREPARE request. Which is a bad idea because now you have 2 round trips for each statement you perform - first to prepare unnecessarily and then to execute.