Inflation remained stubbornly high in August, largely on the back of higher energy prices amid the Iran war, economists said.