No ping via local subnet if OSPF turned on ip interface

hello. I have a very strange issue, where ping/tracert does not pass via L2 switch to connected router, but pass via transit OSPF router instead, if OSPF protocol active on IP interfaces.
What is the reason for this?
On network diagram, tracert from Router A (source ip from interface 12, source interface 12) to Router B (ip from interface 12) does not pass directly via local link from interface 12 to interface 12, but pass via one of Rx. No ARP record for Router B in Router A ARP table.
If OSPF turned off on both A and B on interfaces 12, then ping/tracert works from if 12 to if 12.
Also, if Routers A and B added as Static neighbors to each other, ping also works via local link (from if 12 to if 12).
OSPF interfaces ports 12,8 are ptmp with static neighbors (Router A, B, R1…R5).
On all Routers LLDP records are correct, so L2 visibility is fine, full mesh.

Is it my lack of some basic OSPF knowledge or some unique bug?

Network diagram is:
Screenshot 2024-07-18 113431.png
Router A config

# 2024-07-18 11:09:11 by RouterOS 7.16beta4
#
# model = CCR2116-12G-4S+
/system identity
set name=Router_A
/interface bridge
add name=br_LAN port-cost-mode=short
add name=br_Loopback
/interface vrrp
add interface=br_LAN name=vrrp_LAN priority=110
/interface list
add name=LLDP
add name=OSPF_A0
add name=OSPF_A5_ptmp
/routing id
add disabled=no id=99.99.128.253 name=id-br_LAN select-dynamic-id="" \
    select-from-vrf=main
/routing ospf instance
add disabled=no name=ospf-instance-1 redistribute=connected,static router-id=\
    id-br_LAN routing-table=main
/routing ospf area
add disabled=no instance=ospf-instance-1 name=ospf-area-0
add area-id=0.0.0.5 disabled=no instance=ospf-instance-1 name=ospf-area-5
/interface bridge port
add bridge=br_LAN interface=ether1 internal-path-cost=10 path-cost=10
/ip neighbor discovery-settings
set discover-interface-list=LLDP lldp-mac-phy-config=yes lldp-max-frame-size=\
    yes protocol=lldp,mndp
/interface list member
add interface=ether1 list=LLDP
add interface=sfp-sfpplus1 list=LLDP
add interface=sfp-sfpplus1 list=OSPF_A0
add interface=ether12 list=OSPF_A5_ptmp
add interface=ether12 list=LLDP
/ip address
add address=99.99.128.253/24 interface=br_LAN network=99.99.128.0
add address=99.99.128.254/24 interface=vrrp_LAN network=99.99.128.0
add address=99.99.172.237/30 interface=sfp-sfpplus1 network=99.99.172.236
add address=99.99.172.254/28 interface=ether12 network=99.99.172.240
add address=99.99.172.233 interface=br_Loopback network=99.99.172.233
/routing bfd configuration
add disabled=no interfaces=OSPF_A5_ptmp min-rx=1s min-tx=1s vrf=main
/routing ospf interface-template
add area=ospf-area-0 disabled=no interfaces=OSPF_A0 type=ptp
add area=ospf-area-5 disabled=no interfaces=OSPF_A5_ptmp type=ptmp use-bfd=\
    yes
/routing ospf static-neighbor
add address=99.99.172.241%ether12 area=ospf-area-5 disabled=no
add address=99.99.172.242%ether12 area=ospf-area-5 disabled=no
add address=99.99.172.243%ether12 area=ospf-area-5 disabled=no
add address=99.99.172.244%ether12 area=ospf-area-5 disabled=no
add address=99.99.172.245%ether12 area=ospf-area-5 disabled=no
add address=99.99.172.253%ether12 area=ospf-area-5 disabled=no
/tool romon
set enabled=yes

Router B config

# 2024-07-18 11:08:30 by RouterOS 7.16beta4
#
# model = CCR2116-12G-4S+
/system identity
set name=Router_B
/interface bridge
add name=br_LAN port-cost-mode=short
add name=br_Loopback
/interface vrrp
add interface=br_LAN name=vrrp_LAN priority=105
/interface list
add name=LLDP
add name=OSPF_A0
add name=OSPF_A5_ptmp
/routing id
add disabled=no id=99.99.128.252 name=id-br_LAN select-dynamic-id="" \
    select-from-vrf=main
/routing ospf instance
add disabled=no name=ospf-instance-1 redistribute=connected router-id=\
    id-br_LAN routing-table=main
/routing ospf area
add disabled=no instance=ospf-instance-1 name=ospf-area-0
add area-id=0.0.0.5 disabled=no instance=ospf-instance-1 name=ospf-area-5
/interface bridge port
add bridge=br_LAN interface=ether1 internal-path-cost=10 path-cost=10
/ip neighbor discovery-settings
set discover-interface-list=LLDP lldp-mac-phy-config=yes lldp-max-frame-size=\
    yes protocol=lldp,mndp
/interface list member
add interface=ether1 list=LLDP
add interface=sfp-sfpplus1 list=LLDP
add interface=sfp-sfpplus1 list=OSPF_A0
add interface=ether12 list=OSPF_A5_ptmp
add interface=ether12 list=LLDP
/ip address
add address=99.99.128.252/24 interface=br_LAN network=99.99.128.0
add address=99.99.128.254/24 interface=vrrp_LAN network=99.99.128.0
add address=99.99.172.238/30 interface=sfp-sfpplus1 network=99.99.172.236
add address=99.99.172.253/28 interface=ether12 network=99.99.172.240
add address=99.99.172.234 interface=br_Loopback network=99.99.172.234
/routing bfd configuration
add disabled=no interfaces=OSPF_A5_ptmp min-rx=1s min-tx=1s vrf=main
/routing ospf interface-template
add area=ospf-area-0 disabled=no interfaces=OSPF_A0 type=ptp
add area=ospf-area-5 disabled=no interfaces=OSPF_A5_ptmp type=ptmp use-bfd=\
    yes
/routing ospf static-neighbor
add address=99.99.172.241%ether12 area=ospf-area-5 disabled=no
add address=99.99.172.242%ether12 area=ospf-area-5 disabled=no
add address=99.99.172.243%ether12 area=ospf-area-5 disabled=no
add address=99.99.172.244%ether12 area=ospf-area-5 disabled=no
add address=99.99.172.245%ether12 area=ospf-area-5 disabled=no
add address=99.99.172.254%ether12 area=ospf-area-5 disabled=no
/tool romon
set enabled=yes