[FLINK-27223][python] Fix the state access problem when python.state.cache-size is set to 0
[FLINK-27223][python] Fix the state access problem when python.state.cache-size is set to 0

This closes #19457.

apache/flink,zjureel/flink,wwjiang007/flink,xccui/flink,wwjiang007/flink,apache/flink,zentol/flink,zentol/flink,godfreyhe/flink,lincoln-lil/flink,apache/flink,xccui/flink,wwjiang007/flink,zjureel/flink,zentol/flink,wwjiang007/flink,xccui/flink,godfreyhe/flink,wwjiang007/flink,xccui/flink,wwjiang007/flink,lincoln-lil/flink,lincoln-lil/flink,zentol/flink,godfreyhe/flink,zentol/flink,godfreyhe/flink,apache/flink,xccui/flink,lincoln-lil/flink,zjureel/flink,apache/flink,xccui/flink,lincoln-lil/flink,godfreyhe/flink,godfreyhe/flink,lincoln-lil/flink,zjureel/flink,apache/flink,xccui/flink,zjureel/flink,zentol/flink,zjureel/flink,godfreyhe/flink,wwjiang007/flink,lincoln-lil/flink,apache/flink,zentol/flink,zjureel/flink