@Vasiliy Grinko Thanks for reaching out. You can make APIM (basic tier) available through Application Gateway and disable direct APIM public access as long as Application gateway virtual network can connect to Private link of APIM.
Error message says Request originated from client public IP address it means request going through public not private so configuration in app gateway could be incorrect.
you need to check the network from app gateway to APIM see if it's really going through private endpoint.